Forum Discussion
Using Power Query SDK
- Anonymous1 year ago
Hi jaryszek,
It means that Power BI Desktop does not provide a built-in API to programmatically insert or modify Power Query (.m) code inside a ".pbix" file, but using Power BI Templates (.pbit) allows you to store queries separately from data, making it easier to manage and reuse them across reports.
To integrate .pq files into a development pipeline, you can:
* Merge .pq files into a single .m script and store it in version control (e.g., Git, Azure DevOps).
* Use a ".pbit" template containing predefined queries to create reports dynamically.
* Then use PowerShell or Power BI REST API to create ".pbux" reports dynamically from the
template.
* Once the ".pbix" file is created, you can publish it automatically using the Power BI REST API or
PowerShell.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support TeamIf this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Hello,
sorry but problem is not solved.
Hi jaryszek,
Could you please tell me what and where exactly you are facing an issue with or is the issue mentioned in original question still persist?
Thank you
- jaryszek1 year agoSuper User
With pleasure:
"Power BI Desktop does not have native APIs for direct .m code injection. But, after merging the files into a single .m script, we can use Power BI Template Files (.pbit) which store queries separately from data."
What does it mean? How can i use pqfiles with development pipeline?
Best,
Jacek- Anonymous1 year agoNot applicable
Hi jaryszek,
It means that Power BI Desktop does not provide a built-in API to programmatically insert or modify Power Query (.m) code inside a ".pbix" file, but using Power BI Templates (.pbit) allows you to store queries separately from data, making it easier to manage and reuse them across reports.
To integrate .pq files into a development pipeline, you can:
* Merge .pq files into a single .m script and store it in version control (e.g., Git, Azure DevOps).
* Use a ".pbit" template containing predefined queries to create reports dynamically.
* Then use PowerShell or Power BI REST API to create ".pbux" reports dynamically from the
template.
* Once the ".pbix" file is created, you can publish it automatically using the Power BI REST API or
PowerShell.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support TeamIf this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.