IRubricatorInstance.CreateFiltrationMatrix

Syntax

CreateFiltrationMatrix (Selections: IDimSelectionSet): IMatrixModel;

Parameters

Selections. Complex dictionary selection.

Description

The CreateFiltrationMatrix method creates a filtered data matrix.

Comments

This method enables the user to get information whether time series database contains data.

Example

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

Add links to the Cubes, Dimensions, Metabase, Rds system assemblies.

Function CreateRubricatorSelectionSet(facts: IMetaDictionary): IDimSelectionSet;
    Var
        Result: IDimSelectionSet;
        Factory: IDimSelectionSetFactory;
        Attribute: IMetaAttribute;
    Begin
        Factory := New DimSelectionSetFactory.Create As IDImSelectionSetFactory;
        Result := Factory.CreateDimSelectionSet;
        For Each Attribute In Facts.Attributes Do
            If (Attribute.ValuesObject <> NullAnd (Attribute.Nullable = FalseThen
                Result.Add((Attribute.ValuesObject.Open(NullAs IDimInstance));
                Result.Item(Result.Count - 1).SelectAll;
            End If;
        End For;
        Return Result;
End Function CreateRubricatorSelectionSet;

Sub UserProc;
Var
    Metabase: IMetabase;
    Object: IMetabaseObjectDescriptor;
    Rubricator: IRubricatorInstance;
    Selections: IDimSelectionSet;
    FiltMat: IMatrix;
Begin
    // Get repository
    Metabase := MetabaseClass.Active;
    // Get time series database
    Object := Metabase.ItemById("TSDB");
    Rubricator := Object.Open(NullAs IRubricatorInstance;
    // Get filtered data matrix
    Selections := CreateRubricatorSelectionSet(Rubricator.Rubricator.Facts);
    FiltMat := Rubricator.CreateFiltrationMatrix(Selections) As IMatrix;
    // Display the number of matrix dimensions in the console window
    Debug.WriteLine("Number of matrix dimensions: " + FiltMat.DimensionCount.ToString);
End Sub UserProc;

After executing the example the console window displays the number of dimensions included into filtered data matrix.

See also:

IRubricatorInstance