Return m expression text for all queries in semantic model #307
-
| I feel like this must already be possible with semantic link, but I am struggling to find any mention in the documentation of a way to return the m expression text for all queries within a semantic model. The closest I've gotten so far is using sempy  I'm also not seeing anything in the  | 
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 11 replies
-
| Whoops, I think I answered my own question. Looks like the 'Query' column of  I'm guessing  | 
Beta Was this translation helpful? Give feedback.
-
| This is the easiest way to access that. import sempy.fabric as fabric
fabric.list_partitions(dataset='', workspace='') | 
Beta Was this translation helpful? Give feedback.
-
| Premium is not a requirement. What is your permission on the workspace? You must be be either admin/member/contributor. | 
Beta Was this translation helpful? Give feedback.
-
| Can you check if this tenant setting is disabled? | 
Beta Was this translation helpful? Give feedback.
-
| Do you have xmla r/w enabled on the capacity? You can probably run list_datasets if you set the parameter mode=‘rest’ because it doesn’t use xmla (that forces the function to call an api, not xmla). | 
Beta Was this translation helpful? Give feedback.
-
| Correct. The list functions for the semantic model (list_tables, list_columns, list_partitions etc) use the Tabular Object Model API (TOM) to get the metadata. The odd thing is that I’m not aware of any calls to ‘discover’ objects. | 
Beta Was this translation helpful? Give feedback.

This is the easiest way to access that.