Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
olegkazanskyi
Helper II
Helper II

How to get M query from dataflows. Power BI Server Analysis Services DMV request

The target is to get all  M codes from Power BI Service.

dataflows take a big part in the Power BI data structure.

 

I tried codes that work for datasets, but they apparently do not work for dataflow:

SELECT *

FROM $SYSTEM.TMSCHEMA_PARTITIONS

 

and

 

SELECT *

FROM $SYSTEM.TMSCHEMA_EXPRESSIONS

 

In The Power BI Workspace opened with Analysis services there is an entity named "Dataflows" with all the dataflow inside.

I try running the same codes for this entity as for datasets, but the results are weird. 

Some codes show reference to a table itself, and 90% of tables are missing.

 

Is there a way to get M Query for all tables inside dataflow (loaded and not loaded) using DMV queries?

 

@d_gosbell , @lbendlin  could you help with this issue?

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

There is no XMLA endpoint access to the dataflows at the moment. You would have to export the JSON files one by one.

 

lbendlin_0-1639604878989.png

Or use the API

Dataflows - Get Dataflow - REST API (Power BI Power BI REST APIs) | Microsoft Docs

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

There is no XMLA endpoint access to the dataflows at the moment. You would have to export the JSON files one by one.

 

lbendlin_0-1639604878989.png

Or use the API

Dataflows - Get Dataflow - REST API (Power BI Power BI REST APIs) | Microsoft Docs

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.