ICubeMetaUpdateEx.MetavalsAttributeRemappings

Syntax

MetavalsAttributeRemappings: ICubeMetaUpdateAttributeRemappings;

Description

The MetavalsAttributeRemappings property determines a collection of correspondences between observation attributes of copied database and observation attributes of database copy.

Comments

The method that is used to determine value of the observation attribute in the database copy is determined by the ICubeMetaUpdateAttributeRemapping.Type property.

Example

Executing the example requires that the repository contains a time series database with the FC_SOURCE identifier that contains the COMMENT custom string observation attribute. It also must contain a time series database with the FC_TARGET identifier that contains the NOTE custom string observation attribute. These databases do not contain custom factors attributes.

Add links to the Metabase, Cubes system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    RubUpdateEx: ICubeMetaUpdateEx;
    RubSource: IRubricator;
    AttrR: ICubeMetaUpdateAttributeRemapping;
Begin
    mb := MetabaseClass.Active;
    RubUpdateEx := New CubeMetaUpdateClass.Create As ICubeMetaUpdateEx;
    RubSource := mb.ItemById("FC_SOURCE").Bind As IRubricator;
    RubUpdateEx.Rubricator := RubSource;
    RubUpdateEx.CopyData := True;
    RubUpdateEx.CopyExtraObjects := False;
    RubUpdateEx.Metabase := mb;
    RubUpdateEx.TargetRubricator := mb.ItemById("FC_TARGET").Bind As IRubricator;
    AttrR := RubUpdateEx.MetavalsAttributeRemappings.FindById("NOTE");
    AttrR.Source := "COMMENT";
    AttrR.Type := CubeMetaUpdateAttributeRemappingType.ValueSource;
    RubUpdateEx.Apply(Null);
End Sub UserProc;

After executing the example the COMMENT and NOTE attributes are set into correspondence: when data of the FC_SOURCE database is copied to the FC_TARGET database, data of the COMMENT attribute is copied to the NOTE attribute.

See also:

ICubeMetaUpdateEx