Forum Discussion

jaryszek's avatar
jaryszek
Super User
1 year ago
Solved

Using Power Query SDK

hi Guys, 1. I have a multiple connectors as *.pq files and want to import them into power bi desktop automatically (not manually one by one) and use in power bi service. I want to use cloud data,...
  • Anonymous's avatar
    Anonymous
    1 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 Team

     

    If this post helps then please mark it as a solution, so that other members find it more quickly.

    Thank you.