Forum Discussion
How to update dataflow M scripts from JSON file?
Hi Anonymous ,
After testing, I think you can try to directly copy the updated M code in development workspace to the Advanced editor of the dataflow in production workspace. That will update an existing dataflow from a JSON file instead of creating a new dataflow from the JSON file.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years agoNot applicable
Hi v-kkf-msft ,
Thank you for the support. This is actually what I currently do. But since I have multiple queries that I want to update in the dataflow, this is way more effort than importing all changes from one JSON file at once.
Do you know whether changing the M code of the queries in the dataflow can be automated through Power BI API with Pro or Premium per User license?
Best regards,
Martin- v-kkf-msft5 years ago
Community Support
Hi Anonymous ,
Unfortunately, according to the document https://docs.microsoft.com/en-us/rest/api/power-bi/dataflows , it should be impossible to use Rest API to automatically update the M code.
Best Regards,
Winniz- Anonymous5 years agoNot applicable
Hi v-kkf-msft ,
Thank you! This confirms my research. It seems the API doesn't know anything like a "Query" object in a dataflow, only dataflow level settings affecting all queries. I'll submit the JSON update as an idea.
BR
Martin