IRubricatorFactorIO.FactDataKind

Syntax

FactDataKind: MetaAttributeKind;

Description

The FactDataKind property determines a type of the factor attribute, which values must be loaded or saved.

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 latest data by the following two database attributes is loaded and displayed in the development environment console:

See also:

IRubricatorFactorIO