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 MDM_REPO identifier and the C:\Replication.zip file that contains a copy of the time series database.

Sub Main;

Var

mb: IMetabase;

RubUpdateEx: ICubeMetaUpdateEx;

CrInfo: IMetabaseObjectCreateInfo;

s: string;

Facts: IMetaDictionary;

i: Integer;

metaA: 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

metaA := Facts.Attributes.Item(i);

Debug.WriteLine(metaA.Name);

End For;

RubUpdateEx.Apply(Null);

End Sub Main;

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

See also:

ICubeMetaUpdateEx