PartitionDimensionKey(DestinationKey: Integer): Integer;
DestinationKey. Opened cube instance key.
The PartitionDimensionKey property determines a dimension key for the specified cube instance, in which the selection will be divided during simultaneous cache update.
If a dimension is determined, the selection will be divided into parts during cache update. The cells with data that correspond to elements of specific parts will be processed simultaneously in a single stream. The number of parts, into which the selection is divided, is determined automatically and depends on computer specifications. To update cache, use the ICubeInstanceDestination.UpdateCacheBySelection method.
To reset a dimension, set the PartitionDimensionKey property to -1.
NOTE. Simultaneous cache update is available only in standard cubes.
Executing the example requires that the repository contains a standard cube with the STD_CUBE identifier. The cube should have a dimension with the CALENDAR identifier. The cube can cache data in the cube cached data warehouse.
Add links to the Cubes and Metabase system assemblies.
Sub UserProc;
Var
MB: IMetabase;
MDesc, CacheDesc: IMetabaseObjectDescriptor;
Cache: ICubeCacheSaver;
CubeInst: ICubeInstance;
Dest: ICubeInstanceDestination;
Begin
MB := MetabaseClass.Active;
MDesc := MB.ItemById("STD_CUBE");
CacheDesc := GetCache(MDesc);
If CacheDesc <> Null Then
Cache := CacheDesc.Edit As ICubeCacheSaver;
// Open cube
CubeInst := MDesc.Open(Null) As ICubeInstance;
Dest := CubeInst.Destinations.DefaultDestination;
// Set dimension for simultaneous cache update
Cache.PartitionDimensionKey(Dest.Key) := MB.GetObjectKeyById("CALENDAR");
(Cache As IMetabaseObject).Save;
End If;
End Sub UserProc;
Function GetCache(MObj: IMetabaseObjectDescriptor): IMetabaseObjectDescriptor;
Var
Desc: IMetabaseObjectDescriptor;
Begin
For Each Desc In MObj.Children Do
If Desc.ClassId = MetabaseObjectClass.KE_CLASS_CUBE_CACHE_SAVER Then
Return Desc;
End If;
End For;
Return Null;
End Function GetCache;
After executing the example, a dimension, which selection will be used during simultaneous cache update, will be set in cube cache settings.
See also: