Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Our team is leveraging a tool to extract PowerM query from DataMashup file in pbix files. But the DataMashup file no longer exists in the pbix generated by latest PowerBI client. Where is the file moved to? If it no longer exists, how can we extract PowerM query from pbix file?
Save the pbix to a pbit.
This DOES contain the DataMashup file and also the DataModelSchema in text JSON format (which is much easier to extract the query from). The DataMashup includes data that is entered directly into the .pbix in compressed format at the beginning of the file.
Hello @yifguo, a while has passed since this post, did you find a solution to the problem? I'm in the same situation currently. Thanks!
You're correct. The Enhanced dataset metadata preview changes the way we save the pbix file. The DataMashup is no longer saved in the pbix if the model and queries are in sync, and instead we regenerate the Mashup on open. All of the metadata that was in the Mashup is now saved in the data model, so you should be able to get the M expressions from the data model now instead.
Tried to find the Power M queries from data model, but seems that the file was encrypted. Could you help me figure out how to extract the queries from data model? Thanks.
@yifguo have you found a way to extract queries from model, when "Store datasets using enhanced metadata format" is ticked?
What tools are/were you using? We are facing similar issue and trying to find a way to extract and rewrite data in this file.
Facing same issue, DataMashup file is not part of the package anymore, and I can't decode DataModel (it's encrypted?), any luck?
Hi @slavikgl,
have a look at my Export2Dataflow solution.
Here I use PowerShell to extract the M code from Power BI Desktop and save it in a Dataflow format.
Maybe the example will help you for your requirement.
https://github.com/MarcusWegener/Export2Dataflow
I am also trying to figure out how to extract the datamodel in a stand alone tool and haven't been able to get it loaded. Would love to hear if anything works for you guys.
Hi @yifguo ,
The DataMashup file are not removed in pbix file for latest PowerBI client. How did you create the pbix file?
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
The version of power BI I am using is
Version: 2.82.5858.602 64-bit (June 2020)
The .pbix files it generates do not contain DataMashup file.
Hi @yifguo ,
How did you get version 2020 June? What I can get is the version of 2020 May, please try to use this version: https://www.microsoft.com/en-us/download/details.aspx?id=58494
Best Regards,
Dedmon Dai
Maybe I am on the insider ring? But I think the version doesn't really matter, as https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-enhanced-dataset-metadata states, it will finally move to enhanced dataset. So my question is, how to extract the powerM query when enhanced dataset is turned on?
Hi @yifguo ,
maybe that will help you.
https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-enhanced-dataset-metadata
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |