Metadata-Version: 2.1
Name: PyPbitExtractor
Version: 1.1.3
Summary: Extract Measures and its Description, Source Information, and Relationships from Power BI template.
Author-email: Akash Rajak <aakashrajak02@gmail.com>
Maintainer-email: Pragya Gautam <pragyagautam020801@gmail.com>, Akash Rajak <aakashrajak02@gmail.com>, Ayush Jain <jainaayush051@outlook.com>
License: MIT License
        
        Copyright (c) [2023] [Akash Rajak]
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: License.txt
Keywords: DAX Formatter,EXCEL,JSON,OpenAI,Power BI,pbit
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.7
Description-Content-Type: text/markdown

## ✔ Power BI Automation Using Open AI API
### Problem Statement:
- Power BI documentation is essential for maintaining the accuracy and integrity of data models, ensuring compliance with regulations, and improving collaboration and efficiency across teams. 
- It is a time-consuming task that requires more human intervention and is highly error prone. 
- Our model aims to automate this process using OpenAI's NLP capabilities. 
		
****

### Purpose:
- The purpose of our Power BI model documentation automation is to provide a Time-saving and Accurate solution for fetching pbix details. Below are the purpose that our model is fulfilling:
    - Automating the Power BI model documenter using one of the most efficient GPT-3 architecture i.e. `text-davinci-002`.
    - Fetched the `Measures`, `Source Information`, and `Model Relationships` attributes from the Power BI report.
    - Wrote back the Measures and Modification Descriptions and displayed on hovering the respective properties in updated pbit files.
    - Presented the output into three directories, namely `EXCEL`, `JSON` and `Updated PBIT`.

****

### Input/Output Deliverables:
```
- Input: 
    - Single File
    - Multiple Files
    - A Folder

- Output:
    - Excel Directory
    - JSON Directory
    - Updated PBIT Directory
```

****

### Features:
- Implemented following features in our model:
    1.	Features in JSON Deliverables:
        - `DataModelSchema Generation`: Generated the datamodelschema file for the respective pbit file and stored it in JSON format.

    2.	Features in EXCEL Deliverables:
        - `Measure Sheet`:
            - Measure Name
            - Measure Expression
            - Measure Data Type
            - Measure Description
        - `Source Information Sheet`:
            - Table No
            - Table Name
            - Table Mode
            - Table Type
            - Table Source
            - Original Table Name
            - Table Query
            - Modification
            - Modification Description
        - `Relationships Sheet`:
            - From Table
            - From Column
            - To Table
            - To Column
            - State
            - Direction
            - Cardinality

    3.	Features in UPDATED PBIT Deliverables:
        - `Dynamic Hover Description`: Made the Measures and Modifications Description to hover on each respective properties.

****

### Prerequisites:
- In order to use this script, one need to ensure to met the following requirements:
    - A Power BI Desktop installation (version - 2.115.663.0 64-bit).
    - A valid API secret key for OpenAI's NLP capabilities.
    - Python 3.7 or later installed on your machine.
    - Access to the Power BI models that you want to document.

****
****

## ✔ Package Description
### PyPbitExtractor
    - Created a python package for the given python script and published it on https://pypi.org/

### Package Usage
```
- from PyPbitExtractor import Extractor
    - This command will install all the uninstalled required libraries used in script.
- Extractor.api()
    - This command will prompt user for Open API Secret Key.
- Extractor.main()
    - This will prompt user for input of file selection and thereafter the repective file/folder.
```

### Package Installation
```bash
pip install PyPbitExtractor
```