Introduction:
In this blog, we will learn how to connect Power BI with Azure Databricks.
Pre-requisites:
1. A user with a co-administrator role in Azure Subscription.
2. Azure Databricks setup
3. Power BI account and desktop application
Description:
You must have knowledge about how Azure Data lake and Databricks components.
Open the Azure Databricks service and follow the below steps.
Steps:
1. Get a personal access token for Databricks API access.
Open the Workspace on the Azure Databricks.
Click on Generate New Token.
2. To get the JDBC server address, click on clusters.
3. Open the cluster.
4. In the configuration tab, expand the advance options.
Replace jdbc:spark with https.
Remove everything in the path between the port number and SQL, retaining the components indicated by the boxes in the image below.
Create a URL like below
https://centralus.azuredatabricks.net:443/sql/protocolv1/o/2568757363903995/0725-095122-toads287;
5. Open the Power BI Application and click on Get Data.
6. Search for the Spark connector.
• Server: Enter the server address that you constructed.
• Protocol: Select HTTP.
• Data Connectivity mode: Select DirectQuery, which lets you offload processing to Spark. This is ideal when you have a large volume of data or when you want near real-time analysis.
Unexpected error
If you have received below error while trying to connect Azure Databricks then try with another URL.
Ignore this if you have not encountered this exception.
7. Click on Load and create a Power BI report.
We have successfully connected to Databricks. Generate an interactive report using a dataset.
Reference:
https://docs.azuredatabricks.net/user-guide/bi/power-bi.html