Closed aven1912 closed 1 year ago
@m-kovalsky Just to add little bit more context. When I execute the agg table script by selecting a detail table with legacy partition, it works as expected. When I execute the agg table script by selecting a detail table with m-partition, it creates a legacy partition for the agg table. And it hardcodes the m-query statement from the detail table inside legacy partition query (which understandably fails during partition refresh).
Thanks Aswanth
This tool is really geared towards legacy partitions. However, i've updated the AutoAggs script to create M-partitions in the agg table for corresponding M-partitions in the detail table.
Hello Sir, In this snippet below, it creates a Legacy-Partition for the AggTable by default. I was wondering if it is possible at all to create a M-Partition instead. If so, I would greatly appreciate if you could point me to some documentation to do that. Thanks in advance.
foreach(var p in Model.Tables[tableName].Partitions.ToList()) { var aggPartitionName = p.Name.Replace(tableName,aggTableName); var aggQuery = p.Query.Replace(tableName,aggTableName); var pName = Model.Tables[aggTableName].AddPartition(aggPartitionName); // Update Data Source pName.DataSource = Model.DataSources[dataSource]; // Update Query pName.Query = aggQuery; } // Remove default partition Model.Tables[aggTableName].Partitions[aggTableName].Delete(); }