IStandardCubeDataset.AggregateDuplicatesMode

Fore Syntax

AggregateDuplicatesMode: CubeDatasetAggregateDuplicatesMode;

Fore.NET Syntax

AggregateDuplicatesMode: Prognoz.Platform.Interop.Cubes.CubeDatasetAggregateDuplicatesMode;

Description

The AggregateDuplicatesMode property determines where duplicate data is aggregated.

Comments

By default, duplicate values are aggregated at DBMS server. If the AggregateDuplicatesMode property is set to CubeDatasetAggregateDuplicatesMode.Client, data is aggregated on a client computer. In this case, all necessary data is previously extracted and loaded to client computer memory. The client aggregation is also executed if the data source does not support server aggregation, for example, if ODBS data source is used.

Fore Example

Executing the example requires that the repository contains a standard cube with the STD_CUBE identifier. The repository must also contain an ODBS data source with the YEAR_XLS identifier. The data source is set up to work with any Microsoft Excel file.

Sub UserProc;
Var
    MB: IMetabase;
    StdCube: IStandardCube;
    CubeDest: IStandardCubeDestination;
    DatasetModel: IDatasetModel;
    Dataset: IStandardCubeDataset;
Begin
    MB := MetabaseClass.Active;
    StdCube := MB.ItemById("STD_CUBE").Edit As IStandardCube;
    CubeDest := StdCube.Destinations.Item(0);
    DatasetModel := MB.ItemById("YEAR_XLS").Bind As IDatasetModel;
    //Add data source to cube
    Dataset := CubeDest.Datasets.Add(DatasetModel);
    //Aggregation method
    Dataset.AggregateDuplicatesMode := CubeDatasetAggregateDuplicatesMode.Client;
    //Save
    (StdCube As IMetabaseObject).Save;
End Sub UserProc;

After executing the example a new data source is added to the cube. If data of this data source is used, duplicate data is aggregated on the client computer.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Db;
Imports Prognoz.Platform.Interop.Metabase;

Public Shared Sub Main(Params: StartParams);
Var
    MB: IMetabase;
    StdCube: IStandardCube;
    CubeDest: IStandardCubeDestination;
    DatasetModel: IDatasetModel;
    Dataset: IStandardCubeDataset;
Begin
    MB := Params.Metabase;
    StdCube := MB.ItemById["STD_CUBE"].Edit() As IStandardCube;
    CubeDest := StdCube.Destinations.Item[0];
    DatasetModel := MB.ItemById["YEAR_XLS"].Bind() As IDatasetModel;
    //Add data source to cube
    Dataset := CubeDest.Datasets.Add(DatasetModel);
    //Aggregation method
    Dataset.AggregateDuplicatesMode := CubeDatasetAggregateDuplicatesMode.cdsagdupmClient;
    //Save
    (StdCube As IMetabaseObject).Save();
End Sub;

See also:

IStandardCubeDataset