Connecting Databricks to Power BI: A Step-by-Step Guide for Secure and Fast Reporting
Azure Databricks has become the go-to platform for data engineering and analytics, while Power BI remains the most powerful visualization tool in the Microsoft ecosystem. Connecting Databricks to Power BI bridges the gap between your data lakehouse and business users, enabling real-time insights from curated Delta tables.
In this blog, we’ll walk through the process of securely connecting Power BI to Databricks, covering both DirectQuery and Import mode, and sharing best practices for performance and governance.
Architecture Overview
The connection involves:
– Azure Databricks → Your compute and transformation layer.
– Delta Tables → Your curated and query-optimized data.
– Power BI Desktop / Service → Visualization and sharing platform.
Flow:
1. Databricks processes and stores curated data in Delta format.
2. Power BI connects directly to Databricks using the built-in connector.
3. Users consume dashboards that are either refreshed on schedule (Import) or query live (DirectQuery).
Step 1: Get Connection Details from Databricks
In your Azure Databricks workspace:
1. Go to the Compute tab and open your cluster (or SQL Warehouse if using Databricks SQL).
2. Click on ‘Advanced → JDBC/ODBC’ tab.
3. Copy the Server Hostname and HTTP Path — you’ll need these for Power BI.
For example:
– Server Hostname: adb-1234567890123456.7.azuredatabricks.net
– HTTP Path: /sql/1.0/endpoints/1234abcd5678efgh
Step 2: Configure Databricks Personal Access Token (PAT)
Power BI uses this token to authenticate securely.
1. In Databricks, click your profile icon → User Settings → Developer → Access Tokens.
2. Click Generate New Token, provide a name and expiration, and copy the token immediately. (You won’t be able to view it again.)
Step 3: Connect from Power BI Desktop
1. Open Power BI Desktop.
2. Go to Get Data → Azure → Azure Databricks.
3. In the connection dialog:
   – Server Hostname: paste from Step 1
   – HTTP Path: paste from Step 1
4. Click OK, and when prompted for credentials:
   – Select Azure Databricks Personal Access Token
   – Enter your token in the Password field.
You’ll now see the list of Databricks tables and databases available for import.
To conclude, you’ve successfully connected Power BI to Azure Databricks, unlocking analytical capabilities over your Lakehouse. This setup provides flexibility to work in Import mode for speed or Direct Query mode for live data — all while maintaining enterprise security through Azure AD or Personal Access Tokens.
We hope you found this blog useful, and if you would like to discuss anything, you can reach out to us at transform@cloudfronts.com
