IRubricatorFactorIO.ValueKind

Syntax

ValueKind: MetaAttributeKind;

Description

The ValueKind property determines a type of observation attribute, which values must be loaded or saved.

Comments

The property is set to MetaAttributeKind.None by default, loading is executed by the Value attribute (attribute type MetaAttributeKind.Value).

Example

Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier.

Sub Main;

Var

MB: IMetabase;

RubInst: IRubricatorInstance;

Cub: ICubeInstance;

Dest: ICubeInstanceDestination;

Exe: ICubeInstanceDestinationExecutor;

Mat, DataMatr: IMatrix;

It: IMatrixIterator;

Begin

MB := MetabaseClass.Active;

RubInst := MB.ItemById("OBJ_RUBRICATOR").Open(Null) As IRubricatorInstance;

Cub := RubInst As ICubeInstance;

Dest := Cub.Destinations.DefaultDestination;

Exe := Dest.CreateExecutor;

//Time series attribute

(Exe As IRubricatorFactorIO).FactDataKind := MetaAttributeKind.Key;

//Observation attribute

(Exe As IRubricatorFactorIO).ValueKind := MetaAttributeKind.Revision;

Exe.PrepareExecute(Null);

Exe.PerformExecute;

Mat := Exe.Matrix;

//Values by Key attribute

DataMatr := (CubeClass.ExecuteResult(Mat) As IRubricatorExecuteResult).Factors;

It := DataMatr.CreateIterator;

It.Move(IteratorDirection.First);

While It.Valid Do

Debug.WriteLine(It.Values(0));

It.Move(IteratorDirection.Next);

End While;

//Values by Revision attribute

DataMatr := (CubeClass.ExecuteResult(Mat) As IRubricatorExecuteResult).Values;

It := DataMatr.CreateIterator;

It.Move(IteratorDirection.First);

While It.Valid Do

Debug.WriteLine(It.Values(0));

It.Move(IteratorDirection.Next);

End While;

End Sub Main;

After executing the example the development environment console displays the latest data by the following two attributes of the time series database:

See also:

IRubricatorFactorIO