Skip to main content
This connection uses a Databricks service principal with read-only access to the tables to import. Nothing is created, modified, or staged in your catalogs.
Unity Catalog requiredUnity Catalog is required for this integration. Tables in the legacy Hive metastore are not supported, including tables in the hive_metastore catalog of a Unity Catalog workspace.

Step 1: Identify or create your SQL warehouse

Queries run on a SQL warehouse in your workspace. You can create a dedicated warehouse or use an existing one for the connection.
1

Open the SQL warehouse

In your Databricks workspace, click SQL Warehouses in the navigation pane. To create a dedicated warehouse, click Create SQL Warehouse, enter a Name, choose a Cluster size, and click Create. Otherwise, select the existing warehouse you want to use.
Create SQL warehouse
2

Note the connection details

Click the Connection details tab and make a note of the Server hostname, Port, and HTTP path. You will provide these in Step 5.
SQL warehouse connection details

Step 2: Create a service principal

Workspace admin requiredTo complete the following steps, you or a Databricks admin on your team must be a workspace admin.
1

Add the service principal

Click your username in the top right, click Settings, then Identity and access. Next to Service principals, click Manage. Click Add service principal, click Add new, enter a display name, and click Add.
2

Grant the SQL access entitlement

Open the new service principal. Under Entitlements, select Databricks SQL access and click Update. Make a note of the Application ID, which you will use in the following steps.
3

Grant access to the SQL warehouse

Return to SQL Warehouses and select the warehouse from Step 1. Click Permissions, search for and select the service principal, choose Can use, and click Add.

Step 3: Grant read access to your data

Run the following statements in the SQL editor, replacing the catalog, schema, and table names with your own and <application_id> with the Application ID from Step 2. To run them, you must own the objects or have the MANAGE privilege on them. Only the tables and views you grant access to appear when you choose what to import.
Grant read access
Granting access to the whole schemaTo grant read access to every table and view in the schema instead of listing them individually, replace the per-table grants with a single grant on the schema. A schema-level grant also applies to tables and views created later.
Grant all tables
If you provide a timestamp column for change tracking, ensure that its values increase in commit order. Why: A row committed later with an older timestamp can be skipped.

Step 4: Authorize authentication

Choose the authentication method that fits your security policy. An OAuth secret is recommended because it issues short-lived tokens and can be rotated or revoked centrally.
IP access lists (optional)If your workspace enforces IP access lists, add our static IP address to your allow list. Reach out to your account representative for the static IP address to use.
SSH tunnel (optional)If your workspace is not reachable over the public internet, you can connect through an SSH tunnel instead. Provide the bastion host details in Step 5, and add the public key from your account representative to the bastion’s authorized_keys file.Only SQL queries run through the tunnel. With an OAuth secret, token requests go directly to your workspace hostname, which must remain reachable from our static IP. If your workspace is only reachable through the tunnel, use a personal access token.If your workspace also enforces IP access lists, allow the bastion’s egress IP for SQL queries and our static IP for OAuth token requests.

Step 5: Submit your connection details

Provide the following details to complete the source setup:
  1. The name is a descriptive name of the source.
  2. The server hostname from Step 1 (e.g., dbc-a1b2c3d4-e5f6.cloud.databricks.com).
  3. The port from Step 1 (e.g., 443).
  4. The HTTP path from Step 1 (e.g., /sql/1.0/warehouses/a1b2c3d4e5f6a7b8).
  5. The catalog from Step 3.
  6. The authentication credentials from Step 4:
    • If using an OAuth secret: the client ID and secret.
    • If using a personal access token: the token.
If you are connecting through an SSH tunnel, also provide the SSH host, SSH port, and SSH username for your bastion server.

Terraform

If your organization manages infrastructure with Terraform, you can use the configuration below instead of the steps above. It sets up the same resources and permissions, using OAuth secret authentication.
  • Use the official databricks/databricks provider. Run it as a workspace admin who can grant privileges on catalog and schema_name.
  • In terraform.tfvars, set catalog, schema_name (an existing schema), and warehouse_size. The optional inputs and their defaults are table_names (empty, which grants SELECT on the whole schema), warehouse_name (transfer-warehouse), serverless (true), and service_principal_name (transfer-service-principal).
  • After terraform apply, use the server_hostname, port, http_path, catalog, client_id, and client_secret outputs to complete the connection setup. Print each with terraform output -raw <name>.
  • The client secret expires after 730 days. The next terraform apply after that creates a new secret, which you then update in the connection.