Skip to main content

Connect Power BI Desktop to Databricks

This page describes the different ways to connect to Databricks from Microsoft Power BI Desktop. Power BI Desktop is a Windows-based application that enables you to connect to, shape, and visualize data from a wide range of sources. With Power BI Desktop, you can create interactive reports and dashboards using self-service business intelligence tools.

When you use Databricks as a data source with Power BI, you extend the performance and capabilities of Databricks beyond data scientists and data engineers to all business users.

You can connect Power BI Desktop to your Databricks clusters and Databricks SQL warehouses.

Choose from one of the following methods to connect to Databricks from Power BI Desktop:

If you want to publish data from Databricks to the Power BI service, see Publish to the Power BI service from Databricks.

note

The Databricks connector for Power BI supports the Arrow Database Connectivity (ADBC) driver. Learn more here.

Requirements

  • To use data managed by Unity Catalog with Power BI, Databricks recommends using the latest version of Power BI Desktop.
note

If your operating system is not Windows, run Power BI Desktop on a physical host or a Windows-based virtual machine and then connect to it from your operating system.

If you use a version of Power BI Desktop below 2.85.681.0, install the Databricks ODBC driver in the same environment as Power BI Desktop.

Connect to Databricks using Partner Connect

You can use Partner Connect to connect to a cluster or SQL warehouse from Power BI Desktop.

  1. Make sure your Databricks account, workspace, and the signed-in user meet the requirements for Partner Connect.

  2. In the sidebar, click Marketplace icon Marketplace.

  3. In Partner Connect integrations, click View all.

  4. Click the Power BI tile.

  5. In the Connect to partner dialog, for Compute, choose the name of the Databricks compute resource that you want to connect.

  6. Choose Download connection file.

  7. Open the downloaded connection file, which starts Power BI Desktop.

  8. In Power BI Desktop, enter your authentication credentials:

    • Personal Access Token: Enter your Databricks personal access token.
    • Microsoft Entra ID: Not applicable.
    • Client credentials: Use for M2M OAuth. Enter the client ID and client secret of your service principal.
  9. Click Connect.

  10. Select the Databricks data to query from the Power BI Navigator.

    Power BI Navigator

Connect to Databricks manually

Follow these instructions, depending on your chosen authentication method, to connect to a cluster or SQL warehouse with Power BI Desktop. Databricks SQL warehouses are recommended when using Power BI in DirectQuery mode.

note

To connect faster with Power BI Desktop, use Partner Connect.

  1. Get the Server Hostname and HTTP Path.

  2. Start Power BI Desktop.

  3. Click Get data or File > Get data.

  4. Click Get data to get started.

  5. Search for Databricks, then click the connector Databricks.

  6. Click Connect.

  7. Enter the Server Hostname and HTTP Path.

  8. Select your Data Connectivity mode. For information about the difference between Import and DirectQuery, see Use DirectQuery in Power BI Desktop.

  9. Click OK.

  10. Click your authentication method:

    • Personal Access Token: Enter your personal access token.
    • OAuth: Click Sign in. A browser window opens and prompts you to sign in with your IdP. After the success message appears, exit your browser and return to Power BI Desktop.
    • Client credentials: Use if authenticating with service principals. Enter the client ID and client secret of your service principal.
  11. Click Connect.

  12. Select the Databricks data to query from the Power BI Navigator.

    Power BI Navigator

Power BI Delta Sharing connector

The Power BI Delta Sharing connector allows users to discover, analyze, and visualize datasets shared with them through the Delta Sharing open protocol. The protocol enables secure exchange of datasets across products and platforms by leveraging REST and cloud storage. This method only supports Import mode and allows you to share data with users not on Databricks.

For connection instructions, see Power BI: Read shared data.

Connection configurations

The Databricks Power BI connector supports the following additional connection configurations.

Native SQL queries

The Databricks connector allows you to use native SQL queries for larger operations and compute intensive queries against a Databricks SQL warehouse in Power BI Desktop. This requires Power BI v2.112.603.0 or above (December 2022 release).

Do the following on Power BI Desktop to use native SQL queries:

  1. From the Get Data menu, find the Databricks datasource.
  2. In the connection dialog, enter your catalog and database server details. These fields are required if you want to use native queries.
  3. In Native query, enter the SQL query you want to submit.
  4. After you authenticate, you can query.
  5. To modify the query, use the Power BI Advanced Query Editor. Save your query if you make any changes.

Automated HTTP proxy detection

Power BI Desktop version 2.104.941.0 and above (May 2022 release) has built-in support for detecting Windows system-wide HTTP proxy configuration.

Power BI Desktop can automatically detect and use your Windows system-wide HTTP proxy configuration.

If the proxy server does not provide a CRL distribution point (CDP), Power BI might show the following error message:

Details: "ODBC: ERROR [HY000] [Microsoft][DriverSupport] (1200)
-The revocation status of the certificate or one of the certificates in the certificate chain is unknown."

To fix this error, complete the following steps:

  1. Create the file C:\Program Files\Microsoft Power BI Desktop\bin\ODBC Drivers\Simba Spark ODBC Driver\microsoft.sparkodbc.ini if it does not exist.

  2. Add the following config to your microsoft.sparkodbc.ini file:

    ini
    [Driver]
    CheckCertRevocation=0

Limitations

  • The Databricks connector supports web proxy. However, automatic proxy settings defined in .pac files aren't supported.
  • In the Databricks connector, the Databricks.Query data source is not supported in combination with DirectQuery mode.
  • The data that loads using the Delta Sharing connector must fit into your machine's local memory. To ensure this, the connector limits the number of imported rows to the Row Limit that was set during the initial connection setup. See Power BI: Read shared data.

Additional resources

Support

Power Query documentation