Extract DAX expressions from Power BI template.
Project description
PyDaxExtract
Export DAX
formulas from a Power BI
template file.
Power BI
files in the pbix
and pbit
formats are basically zip archives containing other compressed data.
The DataModel
file in a pbix
file contains all the DAX
formulas created when processing data. Formulas are saved in the Xpress9
format, which is a proprietary compresson method optimized to dump memory to disk and vice-versa, with encryption and all kinds of other wonderful features which will break you heart if you try to get a peek inside.
Fortunately, if one saves a Power BI
workbook as a template, the DAX
formulas are now saved in the DataModelSchema
object, which is unencrypted and requires only a bit of fiddling to remove.
This script is intended to help with that fiddling, and to aid users in serializing work done in an otherwise fairly opaque binary format. Here's hoping it's useful to you.
At this point, there appears to be no way to automate exporting pbix
files as pbit
, so you'll have to do that the usual way.
This script will work as long as it does, given the rate of churn (I mean development) in Power BI
. Good luck!
Usage
daxextract.py --help
usage: daxextract.py [-h] pbit_path [csv_path]
Extract DAX Formulas from DataModelSchema in Power BI template (.pbit) file.
positional arguments:
pbit_path Path to .pbit file.
csv_path Path to write DAX expressions and metadata in csv format. If
this argument is not specified, formulas will be written to
STDOUT
optional arguments:
-h, --help show this help message and exit
Installation
pip install pydaxextract
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for PyDaxExtract-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bacfbf43918c3f39d54996d34b8b12041a08d0d31f0f1e1d4861d3fb2d86454 |
|
MD5 | d777ac53fb9b7202d1ceff76e68477cf |
|
BLAKE2b-256 | 7c9880816fa2ebdf17bb0664c5d6ebe9f70a4e4c202f27976472234a89cede86 |