IRubricatorFactor.CompoundFactor

Fore Syntax

CompoundFactor: Variant;

Fore.NET Syntax

CompoundFactor: object;

Description

The CompoundFactor property returns the composite key of time series.

Comments

The IRubricatorFactor.FactData property returns the comprehensive information on time series.

Fore Example

Executing the example requires that the repository contains a time series database with the RUBRICATOR_CUBE identifier. This database must be based on the data table.

Add links to the Metabase, Cubes system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    RubI: IRubricatorInstance;
    Key: Array[2];
    KeyRes: Array Of Variant;
    FactD: IRubricatorFactData;
    Factor: IRubricatorFactor;
    i: Integer;
Begin
    mb := MetabaseClass.Active;
    // Get time series database
    RubI := mb.ItemById("RUBRICATOR_CUBE").Open(NullAs IRubricatorInstance;
    // Specify composite key
    Key[0] := 512;
    Key[1] := 1009;
    // Get time series by composite key value
    FactD := RubI.GetCompoundFactData(Key);
    Factor := FactD.Factor;
    KeyRes := Factor.CompoundFactor As Array Of Variant;
    For i := 0 To KeyRes.Length - 1 Do
        Debug.WriteLine(KeyRes[i]);
    End For;
End Sub UserProc;

Example execution result: the console window displays the values that form a composite key for the found time series.

Fore.NET Example

Executing the example requires that the repository contains a time series database with the RUBRICATOR_CUBE identifier. This database must be based on the data table.
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Rds;

[STAThread]
Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    RubI: IRubricatorInstance;
    Key: Array[2Of object;
    KeyRes: Array Of object;
    FactD: IRubricatorFactData;
    Factor: IRubricatorFactor;
    i: Integer;
Begin
    mb := Params.Metabase;
    // Get time series database
    RubI := mb.ItemById["RUBRICATOR_CUBE"].Open(NullAs IRubricatorInstance;
    // Specify composite key
    Key[0] := 512;
    Key[1] := 1009;
    // Get time series by composite key value
    FactD := RubI.GetCompoundFactData(Key, DictionaryGetDataOptions.dgdoNone);
    Factor := FactD.Factor;
    KeyRes := Factor.CompoundFactor As Array Of object;
    For i := 0 To KeyRes.Length - 1 Do
        System.Diagnostics.Debug.WriteLine(KeyRes[i]);
    End For;
End Sub;

Example execution result: the console window displays the values that form a composite key for the found time series.

See also:

IRubricatorFactor