Connect to SQL Workbench/J
This article describes how to use SQL Workbench/J with Azure Databricks.
Note
This article covers SQL Workbench/J, which is developed by a third party. To contact the provider, see the SQL Workbench/J support forum in Google Groups..
Requirements
The Databricks JDBC Driver. Download the Databricks JDBC Driver onto your local development machine, extracting the
DatabricksJDBC42.jar
file from the downloadedDatabricksJDBC42-<version>.zip
file.Note
This article was tested with macOS, SQL Workbench/J Build 130, Zulu OpenJDK 21.0.1, and Databricks JDBC Driver 2.6.36.
For Azure Databricks authentication, if you are not using Azure Databricks personal access token authentication, you can skip generating a personal access token later in these requirements. For more information about available Azure Databricks authentication types, see Authentication settings for the Databricks JDBC Driver.
A cluster or SQL warehouse in your Azure Databricks workspace.
The connection details for your cluster or SQL warehouse, specifically the Server Hostname, Port, and HTTP Path values.
An Azure Databricks personal access token or a Microsoft Entra ID (formerly Azure Active Directory) token.. To create a personal access token, follow the steps in Azure Databricks personal access tokens for workspace users.
Note
As a security best practice, when you authenticate with automated tools, systems, scripts, and apps, Databricks recommends that you use personal access tokens belonging to service principals instead of workspace users. To create tokens for service principals, see Manage tokens for a service principal.
Steps to connect to Workbench/J
To connect to Workbench/J, do the following:
- Launch SQL Workbench/J.
- Select File > Connect window.
- In the Select Connection Profile dialog, click Manage Drivers.
- In the Name field, type
Databricks
. - In the Library field, click the Select the JAR file(s) icon. Browse to the directory where you extracted the
DatabricksJDBC42.jar
file from the downloadedDatabricksJDBC42-<version>.zip
file, and select the JAR file. Then click Choose. - Verify that the Classname field is populated with
com.databricks.client.jdbc.Driver
. - Click OK.
- In the Name field, type
- Click the Create a new connection profile icon.
- Type a name for the profile.
- In the Driver field, select Databricks (com.databricks.client.jdbc.Driver).
- In the URL field, enter the JDBC URL for your Azure Databricks resource. For the URL field syntax for JDBC URLs, see Authentication settings for the Databricks JDBC Driver.
- Click Test.
- Click OK twice.