8000
Skip to content
This repository was archived by the owner on Jan 19, 2026. It is now read-only.

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

powerbi-adt

⚠️ ARCHIVED: This repository is archived and no longer maintained.

📝 Blog Post: Read more at Querying Azure Digital Twins with PowerBI Commitizen friendly GitHub issues GitHub GitHub Repo stars

Overview

An example showing how to query Azure Digital Twins from within PowerBI. You could use this to query the current state of your IoT devices, for example, to use the Anomaly Detector cognitive service to check the state of outliers.

powerbi-adt is available under the MIT Licence.

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 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 in PowerBI
  7. Log in to Azure on the CLI with az login
  8. Import the powerbi-query.py as a PowerBI datasource

Editing the query

query_expression = "SELECT * FROM digitaltwins"
query_result = service_client.query_twins(query_expression)
twin_list = pd.DataFrame(query_result)

The example query I provide in the query_expression variable will allow you to query the twin graph - and you can use the Azure Digital Twins query language to build on this. Each individual pandas dataframe will appear as a data set in PowerBI.

Example

You should see something like this...

Limitations

Contact

Feel free to contact me on Twitter. For bugs, please raise an issue on GitHub.

Contributing

Contributions are more than welcome! This repository uses the GitHub flow - and you can choose to use Commitizen to support the use of semantic commits. (npm install -g commitizen cz-customizableand then git cz- easy!)

About

[ARCHIVED] Demo: Querying Azure Digital Twins with PowerBI.

Topics

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0