Merging partitions refers to combining two or more partitions into one partition.
It merges the data of source partitions into a target partition and deletes the source partitions. Partitions can be merged if they are in the same measure group and have same storage mode. Also the source and target partitions has to be fully processed.
Following code sample merges partitions of a specified measure group into the first partition.
Dim mg As MeasureGroup = cube.MeasureGroups.GetByName(MGname)
Dim i As integer
Dim partArray(mg.Partitions.Count - 1) As Partition
For i = 1 To i < mg.Partitions.Count
partArray(i - 1) = mg.Partitions(i)
i = i + 1
Next
mg.Partitions(0).Merge(partArray)
mg.Update()
No comments:
Post a Comment