pbi-tools
is a command-line tool bringing source-control features to Power BI. It works alongside Power BI Desktop and enables mature enterprise workflows for Power BI projects.
An example project is available here: https://github.com/action-bi-toolkit/adventureworksdw2020-pbix
Watch https://www.action-bi.com/action-bi-toolkit for further info. More docs are coming!
Download the tool as a ZIP file (no installer required) from Releases (under Assets). Extract and run from a command prompt.
Make sure to unblock the ZIP file before extracting.
- extract • Extracts the contents of a PBIX/PBIT file into a folder structure optimized for source control
- compile-pbix • Generates a PBIX/PBIT file from sources. PBIX is supported for report-only files, PBIT for files containing models
- export-bim • Generates a BIM file deployable to an XMLA endpoint from sources. Supports both Power BI Premium and Azure Analysis Services
- extract-data • Exports all tables into CSV files from either an offline PBIX file or a running Power BI Desktop session
- info • Prints diagnostics info about the local Power BI environments. Optionally checks for the latest Power BI Desktop release available from Microsoft Downloads
- launch-pbi • Launch a new Power BI Desktop instance with a given PBIX/PBIT file. Does not support Windows Store version
Running pbi-tools.exe
with no actions specified prints all available options.
Running pbi-tools {action} -?
prints usage details for that specific action.
- Windows 64-bit
- Power BI Desktop 64-bit. Installer version (default location) and/or Windows Store version supported. Optionally,
pbi-tools
works with Power BI Desktop in a custom location, provided the path is specified in thePBITOOLS_PbiInstallDir
environment variable. - .Net Framework Runtime 4.7.2 (Comes with Power BI Desktop)
A cross-platform .Net 5 version is currently under development.
-argumentName argumentValue
/argumentName:argumentValue
-argumentName - If the argument is a boolean it will be true in this case.
- Log output can be controlled using the environment variable
PBITOOLS_LogLevel
. - Allowed values are:
- Verbose
- Debug
- Information
- Warning
- Error
- Fatal
- The default is Information, which is also effective when an unknown/invalid option has been specified.
- All build targets are implemented using FAKE.
- Dependencies are managed using Paket.
- Main entry point for all build tasks is
.\build.cmd
. - The fake-cli tool is installed as a local .NET Core Tool, see .config\dotnet-tools.json. That's why a .Net Core 3.x SDK is required to build the project. The
build.cmd
script handles the tool installation.
- Visual Studio 2019 (for MSBuild dependencies)
- .Net Core SDK 3.x or later
- Power BI Desktop x64 (Must be installed in default location for local development:
C:\Program Files\Microsoft Power BI Desktop\
)
.\build.cmd Build
.\build.cmd Test
.\build.cmd UsageDocs -s
dotnet paket install
That is generally not needed as the build.cmd
script takes care of fetching dependencies. However, it could be useful to run this manually on a fresh clone or after making changes in the paket.dependencies
file.
dotnet paket update Microsoft.AnalysisServices.retail.amd64
dotnet paket update Microsoft.AnalysisServices.AdomdClient.retail.amd64
dotnet paket update -g Fake-Build
dotnet paket outdated -g Main
dotnet fake {...}
dotnet fake -t Build
dotnet fake --version
dotnet fake build -s -t SmokeTest
.\pbi-tools.local.cmd extract '.\data\Samples\Adventure Works DW 2020.pbix'
Extract embedded sample PBIX with local build version and 'Raw' serialization mode, into custom output folder
.\pbi-tools.local.cmd extract '.\data\Samples\Adventure Works DW 2020.pbix' -extractFolder '.\data\Samples\Adventure Works DW 2020 - Raw' -modelSerialization Raw