Show contents 

Cubes > Cubes Assembly Interfaces > ICubeMetaUpdateEx > ICubeMetaUpdateEx.SourceDictionary

ICubeMetaUpdateEx.SourceDictionary

Syntax

SourceDictionary(Dictionary: RubricatorDictionary): IMetaDictionary;

Parameters

Dictionary. The dictionary, which metadata must be obtained.

Description

The SourceDictionary property returns the specified metadata of the copied database when the Load method is used.

Example

Executing the example requires an MDM repository with the RDS_REPO identifier and the C:\Replication.zip file that contains a copy of the time series database.

Sub UserProc;
Var
    Mb: IMetabase;
    RubUpdateEx: ICubeMetaUpdateEx;
    CrInfo: IMetabaseObjectCreateInfo;
    s: string;
    Facts: IMetaDictionary;
    i: Integer;
    MetaAttr: IMetaAttribute;
Begin
    Mb := MetabaseClass.Active;
    RubUpdateEx := New CubeMetaUpdateClass.Create As ICubeMetaUpdateEx;
    RubUpdateEx.Metabase := Mb;
    CrInfo := RubUpdateEx.CreateInfo;
    CrInfo.Parent := Mb.Root;
    s := Mb.GenerateId("FC_COPY");
    CrInfo.Id := s;
    CrInfo.Name := s;
    RubUpdateEx.RdsDatabase := Mb.ItemById("RDS_REPO").Bind As IRdsDatabase;
    RubUpdateEx.Load("C:\Replication.zip");
    Facts := RubUpdateEx.SourceDictionary(RubricatorDictionary.Facts);
    For i := 0 To Facts.Attributes.Count - 1 Do
        MetaAttr := Facts.Attributes.Item(i);
        Debug.WriteLine(MetaAttr.Name);
    End For;
    RubUpdateEx.Apply(Null);
End Sub UserProc;

After executing the example a copy of the time series database is created in the repository root. Copy identifier - FC_COPY. The console window displays names of attributes of time series in the copied database.

See also:

ICubeMetaUpdateEx