Skip to main content

Compute settings for the Databricks JDBC Driver (Simba)

note

This page applies to Databricks JDBC driver versions lower than 3. For Databricks JDBC driver version 3 and above, see Databricks JDBC Driver.

This page describes how to configure Databricks compute resource settings for the Databricks JDBC Driver.

note

The JDBC driver doesn't support connecting to job clusters.

Required settings

Configure the following settings to connect to a Databricks compute resource:

Setting

Description

Host

The Server Hostname value from your Databricks compute resource.

Port

443

HTTPPath

The HTTP Path value from your Databricks compute resource.

SSL

1

Schema (optional)

The name of the default schema.

Catalog (optional)

The name of the default catalog.

Connection URL format

Use the following format for the JDBC connection URL:

jdbc:databricks://<server-hostname>:443;httpPath=<http-path>[;<setting1>=<value1>;<setting2>=<value2>;<settingN>=<valueN>]

Java example

The following example shows how to establish a connection using Java:

Java
// ...
String url = "jdbc:databricks://<server-hostname>:443";
Properties p = new java.util.Properties();
p.put("httpPath", "<http-path>");
p.put("<setting1>", "<value1>");
p.put("<setting2>", "<value2>");
p.put("<settingN>", "<valueN>");
// ...
Connection conn = DriverManager.getConnection(url, p);
// ...

For a complete example, see Authentication settings for the Databricks JDBC Driver (Simba).

Replace the <setting> and <value> placeholders with your authentication settings and any driver capability settings.

To get the values for <server-hostname> and <http-path>, see the following sections.

To get the connection details for a Databricks cluster:

  1. Log in to your 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 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 a 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.