ICubeLoaderInstance.Destination

Syntax

Destination: ICubeInstanceDestination;

Description

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

Comments

It is used to set up selection of destination 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 destination cube.

Sub UserProc;
Var
    MB: IMetabase;
    CubLoadInst: ICubeLoaderInstance;
    DimSS: IDimSelectionSet;
    Result: ICubeOperationResult;
    i: Integer;
Begin
    MB := MetabaseClass.Active;
    CubLoadInst := MB.ItemById("CUBE_LOAD").Open(NullAs 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("Loading start: " + Result.TimeStart.ToString);
    Debug.WriteLine("Loading end: " + Result.TimeFinish.ToString);
    If Result.Succeeded Then
        Debug.WriteLine("Data is loaded successfully");
        Debug.WriteLine("Processed records: " + Result.RecordsProcessed.ToString);
    Else
        Debug.WriteLine("Data loading error");
        Debug.WriteLine("Error: " + Result.Error.Message);
    End If;
    Debug.WriteLine(Result.FormattedMessage);
End Sub UserProc;

After executing the example data is loaded to the cube. Loading results will be displayed in the development environment console. Duplicates availability is not checked during saving. Loading is executed by all elements of destination cube.

See also:

ICubeLoaderInstance