Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
Kindly help on the code for updating the M expression code with .net for SSAS Tabular model.
Scenario:
we have table with partition and we have to update the partition query using .net
we have code to replace the existing M Expression with New one ,unfortunately the changes are not updating in Database LEVEL .(SSAS Tabular) .May be i missed any syntax of the .net code.
Please see below code and help out in this.
TOA.Partition partition = m.Tables.Find(Table).Partitions[1];
OverrideCollection oc = new OverrideCollection
{
Partitions =
{
new PartitionOverride
{
OriginalObject =partition,
Source = new MPartitionSourceOverride
{
Expression=expressions
}
}
}
};
var listOc = new List<OverrideCollection>();
listOc.Add(oc);
partition.RequestRefresh(TOA.RefreshType.Add, listOc);
// m.Tables[Table].Partitions[1].Refresh(TOA.RefreshType.Full, listOc); //it is not working
db.Update(UpdateOptions.ExpandFull);
db.Model.SaveChanges();
m.SaveChanges();
TOA.Partition partition1 = m.Tables.Find(Table).Partitions[1];
Thanks,
Santhosh
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
23 | |
3 | |
2 | |
2 | |
2 |