Skip to content

Commit

Permalink
docs(pbi): added screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
Sealjay committed May 24, 2021
1 parent db71f7c commit 415750c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) ![GitHub issues](https://img.shields.io/github/issues/Sealjay-clj/powerbi-adt) ![GitHub](https://img.shields.io/github/license/Sealjay-clj/powerbi-adt) ![GitHub Repo stars](https://img.shields.io/github/stars/Sealjay-clj/powerbi-adt?style=social)

## Overview
An example showing how to query [Azure Digital Twins](https://docs.microsoft.com/en-us/azure/digital-twins/how-to-manage-twin#create-a-digital-twin) from within PowerBI.
An example showing how to query [Azure Digital Twins](https://docs.microsoft.com/en-us/azure/digital-twins/how-to-manage-twin#create-a-digital-twin) from within PowerBI. You could use this to query the current state of your IoT devices, for example, to use the [Anomaly Detector](https://docs.microsoft.com/en-gb/azure/cognitive-services/anomaly-detector/) cognitive service to check the state of outliers.

powerbi-adt is available under the [MIT Licence](./LICENCE).

Implemented use cases:
- List all twins
## Setting up
1. Create an Azure Digital Twin
2. Give yourself access to the data plane - add some example data - the [Azure Digital Twins explorer](https://github.com/Azure-Samples/digital-twins-explorer/) example data is a good start.
3. Create a virtual environment for your Python setup, e.g. `python3 -m venv .venv`
4. Install the requirements `pip install -r requirements-dev.txt`
5. Copy the path to your venv
6. [Enable python scripting](https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-scripts#enable-python-scripting) in PowerBI
7. Log in to Azure on the CLI with `az login`
8. Import the **powerbi-query.py** as a [PowerBI datasource](https://docs.microsoft.com/en-us/power-bi/connect-data/desktop-python-scripts#run-your-python-script-and-import-data)

### Example
You should see something like this...
![](assets/example-dashboard.png)
## Contact
Feel free to contact me [on Twitter](https://twitter.com/sealjay_clj). For bugs, please [raise an issue on GitHub](https://github.com/Sealjay-clj/powerbi-adt/issues).

Expand Down
Binary file added assets/example-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/powerbi-report.pbix
Binary file not shown.

0 comments on commit 415750c

Please sign in to comment.