Forum Discussion
How to update dataflow M scripts from JSON file?
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
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 - dbeavon33 years ago
Memorable Member
v-kkf-msft this is not correct. There is a REST api that updates the M/PQ code for dataflows. It is part of the "imports" API. It doesn't work very well, and is pretty buggy. But it is there.