Compute settings for the Databricks ODBC Driver

This article describes how to configure Azure Databricks compute resource settings for the Databricks ODBC Driver.

This article supplements the information in the following Databricks ODBC Driver articles:

To configure an Azure Databricks connection for the Databricks ODBC Driver, you must combine your authentication settings, any driver capability settings, and the following compute resource settings, into an ODBC Data Source Name (DSN) or a DSN-less connection string.

Whether you use a DSN or DSN-less connection string will depend on the requirements for your target app, tool, client, SDK, or API. For examples of DSNs and DSN-less connection strings, see Authentication settings for the Databricks ODBC Driver.

The driver requires the following compute resource configuration settings:

Setting Description
Driver The driver’s full installation path. To get this path, see Download and install the Databricks ODBC Driver.
Host The Azure Databricks compute resource’s Server Hostname value.
Port 443
HTTPPath The Azure Databricks compute resource’s HTTP Path value.
SSL 1
ThriftTransport 2
Schema (optional) The name of the default schema to use.
Catalog (optional) The name of the default catalog to use.

A DSN that uses the preceding settings uses the following format:

[Databricks]
Driver=<path-to-driver>
Host=<server-hostname>
Port=443
HTTPPath=<http-path>
SSL=1
ThriftTransport=2
<setting1>=<valueN>
<setting2>=<value2>
<settingN>=<valueN>

A DSN-less connection string that uses the preceding settings has the following format. Line breaks have been added for readability. The string must not contain these line breaks:

Driver=<path-to-driver>;
Host=<server-hostname>;
Port=443;
HTTPPath=<http-path>;
SSL=1;
ThriftTransport=2;
<setting1>=<valueN>;
<setting2>=<value2>;
<settingN>=<valueN>
  • Replace <setting> and <value> as needed for each of the target Azure Databricks authentication settings and any special or advanced driver capability settings.
  • To get the values for <server-hostname> and <http-path>, see the following procedures.

To get the connection details for an Azure Databricks cluster, do the following:

  1. Log in to your Azure Databricks workspace.
  2. In the sidebar, click Compute.
  3. In the list of available clusters, click the target cluster’s name.
  4. On the Configuration tab, expand Advanced options.
  5. Click the JDBC/ODBC tab.
  6. Copy the connection details that you need, such as Server Hostname, Port, and HTTP Path.

To get the connection details for a Databricks SQL warehouse, do the following:

  1. Log in to your Azure Databricks workspace.
  2. In the sidebar, click SQL > SQL Warehouses.
  3. In the list of available warehouses, click the target warehouse’s name.
  4. On the Connection Details tab, copy the connection details that you need, such as Server hostname, Port, and HTTP path.

To use the driver with an Azure Databricks cluster, there are two permissions that the calling user or service principal needs when connecting to or restarting the cluster:

  • CAN ATTACH TO permission to connect to the running cluster.
  • CAN RESTART permission to automatically trigger the cluster to start if its state is terminated when connecting.

To use the driver with a Databricks SQL warehouse, the calling user or service principal needs CAN USE permission. The Databricks SQL warehouse automatically starts if it was stopped.

Note

Databricks SQL warehouses are recommended when using Microsoft Power BI in DirectQuery mode.