ICubeMetaLoaderBinding.IndexAttribute

Syntax

IndexAttribute: String;

Description

The IndexAttribute property determines an identifier of the attribute included in the index used for binding.

Comments

The property is in use, if in the dictionary, to which time series database attribute refers, the index is created and several attributes are included into it. To bind these dictionary attributes, create corresponding number of bindings in the ICubeMetaLoaderBindings collection and determine the following settings for each binding:

For example, there is a time series database, which structure contains the HUMAN attribute, which refers to the PEOPLE repository dictionary. The UNIQUEKEY unique index including the NAME, SURNAME and BIRTHDAY dictionary attributes is created in the dictionary structure. The source has two fields, which names correspond to the dictionary attribute names.

Binding code of attributes to the source fields looks as follows:

Var
    //...
    TSDB: IRubricator;
    Attr: IMetaAttributes;
    ImportRequestDef: IImportRequestDefinition;
    Params: IImportRequestProviderParams;
    Bindings: ICubeMetaLoaderBindings;
    Binding: ICubeMetaLoaderBinding;
    Dimension: IDimensionModel;
    //...
Begin
    //...
    Attr := TSDB.Facts.Attributes;
    //...
    Params := ImportRequestDef.ProviderParams;
    Bindings := Params.Bindings;
    //...
    //Dictionary used for attribute creation
    Dimension := Attr.FindById("PEOPLE").ValuesObject.Bind As IDimensionModel;
    // Determine binding for the Name attribute (NAME)
    Binding := Bindings.Add;
    Binding.BindingType := CubeMetaLoaderBindingType.Attribute;
    Binding.Attribute := "HUMAN";
    Binding.Dimension := Dimension;
    Binding.KeyAttribute := "KEY";
    Binding.Index := "UNIQUEKEY";
    Binding.IndexAttribute := "NAME";
    Binding.FieldType := CubeMetaLoaderFieldType.Name;
    Binding.Field := "NAME";
    // Determine binding for the Surname attribute (SURNAME)
    Binding.BindingType := CubeMetaLoaderBindingType.Attribute;
    Binding.Attribute := "HUMAN";
    Binding.Dimension := Dimension;
    Binding.KeyAttribute := "KEY";
    Binding.Index := "UNIQUEKEY";
    Binding.IndexAttribute := "SURNAME";
    Binding.FieldType := CubeMetaLoaderFieldType.Name;
    Binding.Field := "SURNAME";
    // Determine binding for the Birthday attribute (BIRTHDAY)
    Binding.BindingType := CubeMetaLoaderBindingType.Attribute;
    Binding.Attribute := "HUMAN";
    Binding.Dimension := Dimension;
    Binding.KeyAttribute := "KEY";
    Binding.Index := "UNIQUEKEY";
    Binding.IndexAttribute := "BIRTHDAY";
    Binding.FieldType := CubeMetaLoaderFieldType.Name;
    Binding.Field := "BIRTHDAY";
    //...

The example of import object creation, setup and execution is given in the ICubeMetaLoaderBinding.CalendarDateFormatEx property description.

See also:

ICubeMetaLoaderBinding