ICubeLoaderInstance.Destination

Syntax

Destination: ICubeInstanceDestination;

Description

The Destination property returns parameters of opened consumer cube used for the final setup before data loading.

Comments

It is used to set up selection of consumer cube elements, by which data is loaded.

Example

Executing the example requires a data loader with the CUBE_LOAD identifier configured to send data from source cube to consumer cube.

Sub Main;

Var

MB: IMetabase;

CubLoadInst: ICubeLoaderInstance;

DimSS: IDimSelectionSet;

i: Integer;

Result: ICubeOperationResult;

Begin

MB := MetabaseClass.Active;

CubLoadInst := MB.ItemById("CUBE_LOAD").Open(Null) As ICubeLoaderInstance;

DimSS := CubLoadInst.Destination.CreateDimSelectionSet;

For i := 0 To DimSS.Count - 1 Do

DimSS.Item(i).SelectAll;

End For;

Result := CubLoadInst.Execute(DimSS, Null, AutoCubeUpdateOption.NoCheckDuplicates Or AutoCubeUpdateOption.GetResult);

Debug.WriteLine("Loader name: " + Result.Name);

Debug.WriteLine("Loader identifier: " + Result.Id);

Debug.WriteLine("Start of loading: " + Result.TimeStart.ToString);

Debug.WriteLine("End of loading: " + Result.TimeFinish.ToString);

If Result.Succeeded Then

Debug.WriteLine("Data loading has been completed successfully");

Debug.WriteLine("Processed records: " + Result.RecordsProcessed.ToString);

Else

Debug.WriteLine("Error occurred while loading data");

Debug.WriteLine("Error: " + Result.Error.Message);

End If;

WinApplication.InformationBox(Result.FormattedMessage);

End Sub Main;

After executing the example data is loaded into the cube. The results of loading are displayed in the console window and as an information message. On loading data, check for duplicates is not executed. Loading is executed by all elements of consumer cube.

See also:

ICubeLoaderInstance