User Profile
sanAccPowerbi
Copper Contributor
Joined Jan 24, 2019
User Widgets
Recent Discussions
Need Help on Refresh function in .net for overrides the M expression in SSAS Tabular model.
Hi, I need help on the below issue. Function in .net for Overrides the M exrpression In partition of the Table . public void Refresh(RefreshType type, ICollection<OverrideCollection> overrides); public void RequestRefresh(RefreshType type, ICollection<OverrideCollection> overrides); The above two functions are not working for override the old M expression for Paritition query with New Expression. We used the override class then we refresh with above functions unfortunately it is not updating the in the Expression. Code: 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); partition.Refresh(TOA.RefreshType.Add, listOc); Thanks, Santhosh.952Views0likes0CommentsNeed help on the .net code to update M Expression in Tabular Model.
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];783Views0likes0Comments
Recent Blog Articles
No content to show