AggregateDuplicatesMode: CubeDatasetAggregateDuplicatesMode;
The AggregateDuplicatesMode property determines where duplicate data is aggregated.
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.
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.
See also: