Forum Discussion
pgelli
Microsoft Employee
6 years agoGet Table information from dataset Programmatically
Hi All, Is there a way to programatically get the information of datasource & tables used in a dataset (like some kind of metadata). I saw there is a GetDataSet API, but that works on the datas...
lbendlin
Super User
6 years agoselect * from $SYSTEM.TMSCHEMA_PARTITIONS
pgelli
Microsoft Employee
6 years agoThanks lbendlin. I tried that at I dont see information of actual source in response.
I still see the information about dataset tables, not the actual source SQL tables.
- lbendlin6 years ago
Super User
Now you got me really confused. Are you after the schema information?
See if this blog helps you.
https://blog.crossjoin.co.uk/2020/07/05/why-is-power-bi-running-my-sql-query-twice/
- pgelli6 years ago
Microsoft Employee
Sorry for the confusion lbendlin .
My need is to programatically find the list of source tables which are backing a given powerbi report.- lbendlin6 years ago
Super User
That's what I gave you with the DMV query. You need to take that M code and parse it. It contains the server, database and query.