AssignCube(Cube: IStandardCube);
AssignCube(Cube: Prognoz.Platform.Interop.Cubes.IStandardCube);
Cube. Standard cube.
The AssignCube method sets the cube, on which the time series database is based.
Use the IRubricatorCreator.CreateRubricator method co create a time series database.
Executing the example requires that the repository contains a standard cube with the STD_CUBE identifier and an MDM repository with the MDM_REPO identifier. The limits implemented to the standard cube:
It can have only one one fact with one value.
It can have only one source table with data.
It must have at least one dimension.
The formulas created using the Fore language are missing in relations between dimensions.
Add links to the Metabase, Rds, Cubes system assemblies.
Sub UserProc;
Var
mb: IMetabase;
cr: IRubricatorCreator;
CrInfo: IMetabaseObjectCreateInfo;
mbObj: IMetabaseObject;
Begin
mb := MetabaseClass.Active;
cr := New RubricatorCreator.Create;
// Specify repository
cr.Metabase := mb;
// Specify properties of created time series database
CrInfo := cr.CreateInfo;
CrInfo.Id := mb.generateId("RUBRICATOR");
CrInfo.Name := Time series database on the cube;
CrInfo.Parent := mb.Root;
// Specify MDM repository
mbObj := mb.ItemById("RDS_REPO").Bind;
cr.RdsDatabase := mbObj As IRdsDatabase;
// Specify standard cube
mbObj := mb.ItemById("STD_CUBE").Bind;
cr.AssignCube(mbObj As IStandardCube);
// Specify time series database
cr.CreateRubricator;
End Sub UserProc;
Example execution result: the time series database that is based on a standard cube.
Executing the example requires that the repository contains a standard cube with the STD_CUBE identifier and an MDM repository with the MDM_REPO identifier. The limits implemented to the standard cube:
It can have only one one fact with one value.
It can have only one source table with data.
It must have at least one dimension.
The formulas created using Fore language are missing in relations between dimensions.
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Rds;
…
[STAThread]
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
cr: IRubricatorCreator;
CrInfo: IMetabaseObjectCreateInfo;
mbObj: IMetabaseObject;
Begin
mb := Params.Metabase;
cr := New RubricatorCreator.Create();
// Specify repository
cr.Metabase := mb;
// Specify properties of created time series database
CrInfo := cr.CreateInfo;
CrInfo.Id := mb.generateId["RUBRICATOR", 0];
CrInfo.Name := Time series database on the cube;
CrInfo.Parent := mb.Root;
// Specify MDM repository
mbObj := mb.ItemById["RDS_REPO"].Bind();
cr.RdsDatabase := mbObj As IRdsDatabase;
// Specify standard cube
mbObj := mb.ItemById["STD_CUBE"].Bind();
cr.AssignCube(mbObj As IStandardCube);
// Created time series database
cr.CreateRubricator();
End Sub;
Example execution result: the time series database that is based on a standard cube.
See also: