IRubricatorFactorExecutor.UseDwarf

Syntax

UseDwarf: Boolean;

Description

The UseDwarf property determines whether to use optimization when the time series database data is loaded to memory.

Comments

Available values:

Example

Executing the example requires that the repository contains a time series database with the FC identifier. This database must contain an attribute of the time series with the COUNTRY identifier that refers to a dictionary.

Add links to the Metabase, Cubes, Matix, Rds, Orm system assemblies.

Sub uProc;
Var
    MB: IMetabase;
    RubDesc: IMetabaseObjectDescriptor;
    RubrIn: IRubricatorInstance;
    Cub: ICubeInstance;
    Dest: ICubeInstanceDestination;
    FactorExec: IRubricatorFactorExecutor;
    FactsLookup: IRubricatorFactsLookup;
    MetaDLookup: IMetaDictionaryLookup;
    Key: Array Of Integer;
    i: Integer;
    Cond: IOrmCondition;
    Exec: ICubeInstanceDestinationExecutor;
    Mat: IMatrix;
    Ite: IMatrixIterator;
Begin
    MB := MetabaseClass.Active;
    RubDesc := MB.ItemById("FC");
    RubrIn := RubDesc.Open(NullAs IRubricatorInstance;
    Cub := RubrIn As ICubeInstance;
    Dest := Cub.Destinations.DefaultDestination;
    Exec := Dest.CreateExecutor;
    FactorExec := Exec As IRubricatorFactorExecutor;
    FactorExec.MultipleFactors := True;
    FactsLookup := RubrIn.CreateFactsLookup;
    MetaDLookup := FactsLookup.Lookup;
    Cond := MetaDLookup.Where.Add;
    Cond.AttributeName := "COUNTRY";
    Cond.Value := 512;
    i := FactsLookup.LookupFactors.Length;
    Key := New Integer[i];
    Key := FactsLookup.LookupFactors;
    FactorExec.SetFactorKeys(Key);
    FactorExec.ValueKind := MetaAttributeKind.Value;
    FactorExec.ValueId := "VL";
    FactorExec.WhereRevisionBetween(11);
    FactorExec.UseDwarf := True;
    Exec := FactorExec.AsCubeExecutor;
    Exec.PrepareExecute(Null);
    Exec.PerformExecute;
    Mat := Exec.Matrix;
    Ite := Mat.CreateIterator;
    Ite.Move(IteratorDirection.First);
    While Ite.Valid Do
        Debug.WriteLine(Ite.Value);
        Ite.Move(IteratorDirection.Next);
    End While;
End Sub uProc;

After executing the example the console window displays values of time series for the first revision that correspond to the condition: value of the COUNTRIES attribute is 512. The optimization is used when data is obtained.

See also:

IRubricatorFactorExecutor