Copy;
The Copy method copies time series database
Specify value of the IRubricatorCopier.CopyInfo property for the proper method performance.
Executing the example requires a time series database with the TSDB identifier and a folder with the F_TSDB_COPY identifier.
Add links to the Cubes and Metabase system assemblies.
Sub UserCopy;
Var
MB: IMetabase;
pCopier: IRubricatorCopier;
CInfo: IMetabaseObjectCopyInfo;
Begin
// Get current repository
MB := MetabaseClass.Active;
// Create an object for copying a repository object
CInfo := MB.CreateCopyInfo;
CInfo.Id := MB.GenerateId("FC_COPY");
CInfo.Name := Copy of time series database;
CInfo.WithData := True;
CInfo.Destination := MB.ItemById("F_TSDB_COPY");
CInfo.Source := MB.ItemById("TSDB");
// Create an object for copying a time series database
pCopier := New RubricatorCopier.Create;
// Specify general copying parameters
pCopier.CopyInfo := CInfo;
// Specify that copying is performed with data
pCopier.WithObjects := True;
// Specify that copying is performed within one transaction
pCopier.DisableTransactions := True;
// Copy
pCopier.Copy;
End Sub UserCopy;
After executing the example the TSDB time series database is copied with data to the F_TSDB_COPY folder within one transaction.
See also: