FactDataKind: MetaAttributeKind;
The FactDataKind property determines a type of the indicator attribute, which values must be loaded or saved.
Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier.
Sub UserProc;
Var
MB: IMetabase;
RubInst: IRubricatorInstance;
Cube: ICubeInstance;
Dest: ICubeInstanceDestination;
Exec: ICubeInstanceDestinationExecutor;
Matr, DataMatr: IMatrix;
It: IMatrixIterator;
Begin
MB := MetabaseClass.Active;
RubInst := MB.ItemById("OBJ_RUBRICATOR").Open(Null) As IRubricatorInstance;
Cube := RubInst As ICubeInstance;
Dest := Cube.Destinations.DefaultDestination;
Exec := Dest.CreateExecutor;
// Indicators attribute
(Exec As IRubricatorFactorIO).FactDataKind := MetaAttributeKind.Key;
// Observations attribute
(Exec As IRubricatorFactorIO).ValueKind := MetaAttributeKind.Revision;
Exec.PrepareExecute(Null);
Exec.PerformExecute;
Matr := Exec.Matrix;
// Values by the Value attribute
DataMatr := (CubeClass.ExecuteResult(Matr) 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 the Revision attribute
DataMatr := (CubeClass.ExecuteResult(Matr) 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 UserProc;
After executing the example the latest data by the following two database attributes is loaded and displayed in the development environment console:
By the Key indicators attribute.
By the Revision observation attribute.
See also: