Metadata-Version: 2.1
Name: PyDaxExtract
Version: 0.1.5
Summary: Extract DAX expressions from Power BI template.
Home-page: https://gitlab.com/doug.shawhan/pydaxextract
Author: Doug Shawhan
Author-email: doug.shawhan@gmail.com
License: Copyright 2021 Doug Shawhan
        
        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Bug Tracker, https://gitlab.com/doug.shawhan/pydaxextract/issues
Project-URL: Source Code, https://gitlab.com/doug.shawhan/pydaxextract/tree/dev
Project-URL: Documentation, https://pydaxextract.readthedocs.io
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
        
        ```bash
        pip install pydaxextract
        ```
        
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
