-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Power BI files are none other than .zip files which extension has been changed to .pbix. Unzipping a Power BI file to manipulate its contents used to result in a corrupted Power BI file:
Not anymore!
Introducing python-pbi
, a Python package available on PyPI, to manipulate Power BI files via Python scripts without corrupting them. Download a report, update as required, and upload back to the Power BI service, without opening the service itself or the Power BI desktop app.
The python-pbi
package can crack open a Power BI report, present its contents in organised json-like objects (report, pages, visuals, bookmarks, etc.), and modify them outside of the Power BI tools provided by Microsoft.
Use PowerShell scripts to download and upload reports from a Power BI workspace.
Copy headers from the landing page to the rest of pages in a report. Copy pages from one report to another, along with the corresponding bookmarks, via a few Python lines!
Leverage the power of python-pbi
to maintain dev, test, and production workspaces for your Power BI reports. Update the datasets used in the report to match the required dev, test, or production environment as you publish. Hide WIP visuals in production, or replace them by some placeholder message. Update sensitive hyperlinks during deployment to production only to prevent exposure in lower environments.
If you have manipulated a Power BI report via python-pbi
and it gets corrupted, make sure you upload it to the Power BI service, using the steps detailed here. Most often, the report will be readable on the service, and you can edit it further manually there, or after downloading it again.
Yes! Check this example.