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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.