This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
We're excited to announce the release of Power BI in Jupyter notebooks.
You can now tell compelling data stories with Power BI in Jupyter notebooks. Get your Power BI analytics in a Jupyter notebook with the new powerbiclient Python package.
The new package lets you embed Power BI reports in Jupyter notebooks easily. You'll be able to export data from visuals in a Power BI report to the Jupyter notebook for in-depth data exploration. You can also filter the report for quick analysis or use bookmarks to apply a saved view.
You can install the Power BI Client for Jupyter from PyPI and find the open-sourced Python package and associate TypeScript widget on GitHub.
Watch our latest on-demand session - Embed actionable analytics everywhere with Power BI Embedded, for a Power BI in Jupyter notebook demo!
For a quick peek into how to use the package in your application, check out the example below.
Install the package using pip:
pip install powerbiclient
Or if you use JupyterLab:
pip install powerbiclient jupyter labextension install @jupyter-widgets/jupyterlab-manager
Open your notebook and add the following:
from powerbiclient import Report, models
# Import the DeviceCodeLoginAuthentication class to authenticate against Power BI from powerbiclient.authentication import DeviceCodeLoginAuthentication
# Initiate device authentication device_auth = DeviceCodeLoginAuthentication()
group_id="" report_id=" "
report = Report(group_id=group_id, report_id=report_id, auth=device_auth)
report
You can also authenticate against Power BI using an embed token. To do this, pass the embed token and set the token type to Embed when creating the Power BI report instance:
report = Report(group_id=group_id, report_id=report_id, access_token=access_token, token_type=models.TokenType.Embed.value)
If you want to try this experience, you should definitely check out the demo notebook. For instructions on how to run the demo, check out the demo notebook section in the README file.
The package documentation can be found in the GitHub repository wiki.
We greatly appreciate any feedback, so we can continue to improve the integration with Jupyter notebooks. Try it out, and let us know if you have any feedback using this survey.
Power_BI_Embedding_in_Jupyter_Notebooks_-_Get_started_guide
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.