SSAS AMO Objects : Script to Create new partition in a Measure group
In AMO Script when we have partition with some template ie complete query with dummy dates and for example it is named as myTemplatePartitionName_partialday
//generate new partition creation script
// First identify the template partition and assign to a Partition object
//generate new partition creation script
// First identify the template partition and assign to a Partition object
AMO.Partition amoTemplatePartition = amoMeasureGroup.Partitions.FindByName(myTemplatePartitionName_partialday);
// clone that template to another patition Object
AMO.Partition amoNextPartition = amoTemplatePartition.Clone();
// assign the prefdefined name and ID to the partition
amoNextPartition.ID = myNextPartitionName;
amoNextPartition.Name = myNextPartitionName;
Comments
Post a Comment