Power BI deployments
If you would like to automate Power BI deployments, or want to include Power BI reports in your devops pipeline you should check out Power BI Actions which a former colleague of mine created: https://marketplace.visualstudio.com/items?itemName=maikvandergaag.maikvandergaag-power-bi-actions
Power BI is both a self service BI and an enterprise BI tool. In a lot of cases, people publish reports from Power BI Desktop. This can be subject to mistakes when working in a full DTAP environment. You would always have to manually change your connectionstring if you are going to publish to a production workspace. Automating your deployments makes sense.
With Power BI Actions, you can automate the deployment to any environment and workspace. You can:
- Upload Power BI dashboard (pbix file).
- Create a Power BI workspace.
- Remove a Power BI workspace.
- Add a new Admin user to a Power BI workspace.
- Update the connection of a Power BI report.
- Refresh a dataset.
One thing to notice is that you'd probably have the Power BI reports in source control and that they will have connectionstrings to your dev databases and cubes. If you automate the deployments to other environements, you'd have to first publish the report, and then change the connectionstring with Power BI Actions. This means that:
- you overwrite the report in the production workspace which has a connection to production databases, with the latest version in source control, which still points to dev databases;
- You then change the connectionstring.
If something goes wrong between step 1 and 2, you have a report on production that still connects to the wrong environment. Ideally, you would change the connectionstring before you publish it to production. Now, there is not yet (as far as I know) a way to do this. I have tried manipulating the pbix file programmatically, but that is unsupported behaviour. It did work for a while, but doesn't anymore, which is exactly the problem with unsupported methods 😉
Automating deployments is a great idea if you are delivering Power BI reports and the underlying datasets to the business, a datawarehouse or a cube for example. Any changes to the dataset means you have to change the report itself too.