Databricks: Add Database Connection

To define a new connection from the Connection parameter in a Databricks format:

  • Select Add Database Connection. See database-specific parameters below, as well as the section Adding a Database Connection in a Workspace in Using Database Connections The new connection can be made visible only to the current user, or can be shared among multiple users.
Note  To select an existing, previously defined connection, see the section Reusing a Database Connection in Using Database Connections.

Database Connection

Databricks

Name

Enter a name for the new connection.

Connection Parameters

Server Hostname

The server hostname of your Databricks cluster.

HTTP Path

The HTTP path of your Databricks cluster.

Authentication

The method used for authentication. Each method enables different parameter options.

Note  Databricks stopped supporting Databricks-managed passwords as of July 10, 2024. OAuth authentication as well as personal access token authentication are the preferred methods for authentication.

Personal Access Token

Connects using a personal access token from Databricks.

Personal Access Token

The personal access token to connect to the specified cluster. This parameter is enabled when the Personal Access Token authentication method is selected.

OAuth

Uses an OAuth web connection to a service principal that accesses the Databricks service. This option enables the Databricks OAuth Connection parameter, from which you can pick a saved connection, or add a Databricks OAuth Web Connection.

Adding a Databricks OAuth Connection

The OAuth web connection used to connect to the specified cluster. These parameters are enabled when the OAuth authentication method is selected and you click Add Web Connection:

  • Token Endpoint URL – The URL used to request an OAuth connection token.
  • Client ID – The client ID for the OAuth secret for the service principal.
  • Client Secret – The value of the OAuth secret for the service principal.
  • Scope – The scope of the requested OAuth access token. For Microsoft Azure-hosted Databricks clusters, the scope value must be set to 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d/.default. See Get a Microsoft Entra ID access token with the Microsoft identity platform REST API from the Azure Databricks documentation website for more information on the required scope value.
More Information

Catalog

Specifies the default catalog to use once connected. The specified catalog should be an existing catalog.

Note  This parameter is case-sensitive.

Advanced – Specify JDBC Connection

When enabled, this parameter will allow the JDBC connection string and properties to be specified directly, in order to connect to the database.

Option

Description

Connection String

The connection string for the database to which you are connecting.

Mask Connection Details

  • When this option is checked (set to Yes) – Connection strings and properties for database connections are masked in translation and error logs.

Connection details may contain sensitive information, such as passwords. A masked connection string appears as:

jdbc:<subprotocol>:************

While masked connection properties appear as:

{<property_name1>=************,
<property_name2>=************, ...}

Warning  Connection strings for connections whose parameters are embedded in the workspace are not masked, regardless of this setting.
  • When this option is left unchecked (set to No) – Connection strings and properties are logged in plain text.

Connection Property and Value

JDBC connections can be configured with driver-specific arbitrary name/value pairs. The name/value pairs can often be specified in either the Connection String or a Properties object (sometimes only in one way or the other).

Name/value pairs entered here will be set in the order specified, then passed on in a Properties object. They do not require manual encoding of characters that are not safe in Connection Strings.