ICubeMetaUpdateAttributeRemapping.Source

Syntax

Source: String;

Description

The Source property determines an identifier of the indicators attribute of copied database that is used as a data source for the factors attribute of the database copy.

NOTE. This property is taken into account if the value of the ICubeMetaUpdateAttributeRemapping.Type property is CubeMetaUpdateAttributeRemappingType.Source.

Example

Executing the example requires that the repository contains a time series database with the FC identifier that contains the COUNTRY custom indicators attribute. The repository should also contain a time series database with the FC_COPY identifier that contains a custom indicators attribute A_COUNTRY. These attributes must have the same characteristics.

Sub UserProc;
Var
    Mb: IMetabase;
    CrInfo: IMetabaseObjectCreateInfo;
    Obj: IMetabaseObject;
    ObjDesc: IMetabaseObjectDescriptor;
    RubUpdateEx: ICubeMetaUpdateEx;
    Rub: IRubricator;
    AttrRemapping: ICubeMetaUpdateAttributeRemappings;
    AttrR: ICubeMetaUpdateAttributeRemapping;
Begin
    Mb := MetabaseClass.Active;
    CrInfo := Mb.CreateCreateInfo;
    CrInfo.ClassId := MetabaseObjectClass.KE_CLASS_CUBEMETAUPDATE;
    CrInfo.Id := Mb.GenerateId("Cube_Meta_Upd");
    CrInfo.Permanent := True;
    CrInfo.Parent := Mb.Root;
    ObjDesc := Mb.CreateObject(CrInfo);
    Obj := ObjDesc.Edit;
    RubUpdateEx := Obj As ICubeMetaUpdateEx;
    Rub := Mb.ItemById("FC").Bind As IRubricator;
    RubUpdateEx.Rubricator := Rub;
    RubUpdateEx.Metabase := Mb;
    RubUpdateEx.RdsDatabase := Rub.Database;
    RubUpdateEx.TargetRubricator := mb.ItemById("FC_COPY").Bind As IRubricator;
    AttrRemapping := RubUpdateEx.MetafactsAttributeRemappings;
    AttrR := AttrRemapping.FindById("A_COUNTRY");
    AttrR.Source := "COUNTRY";
    AttrR.Type := CubeMetaUpdateAttributeRemappingType.Source;
    Obj.Save;
End Sub UserProc;

After executing the example the correspondence is set between the A_COUNTRY and COUNTRY attributes: when data is copied from one database to another database, data of the COUNTRY attribute is copied to the A_COUNTRY attribute. The object that contains copying settings is saved with the Cube_Meta_Upd identifier.

See also:

ICubeMetaUpdateAttributeRemapping