Connect Databricks to Rig

    Rig connects to Databricks through a SQL warehouse, so you give it the workspace hostname, the warehouse's HTTP path, a catalog and a personal access token. Queries run on that SQL warehouse against Unity Catalog.

    Before you start

    • A Databricks workspace with a running or auto-starting SQL warehouse.
    • The name of the Unity Catalog catalog Rig should read.
    • Permission to create personal access tokens. A workspace admin can turn tokens off, in which case ask them to allow it.
    • A workspace owner, or a role with the Manage connections permission, in Rig.

    Step 1: Get the SQL warehouse connection details

    1. In your Databricks workspace, click SQL Warehouses in the sidebar under SQL.
    2. Click the name of the warehouse Rig should use.
    3. On the Connection Details tab, copy the Server hostname and the HTTP path.

    Step 2: Create a personal access token

    1. In your workspace, click your username in the top bar and select Settings.
    2. Click Developer, then next to Access tokens click Manage.
    3. Click Generate new token and enter a name that identifies it, such as Rig read.
    4. Set the token's lifetime in days.
    5. Click Generate, copy the token and click Done. Databricks shows it once.
    6. Make sure the user or service principal behind the token has read access only to the catalog and schemas Rig should see.

    Tokens for a service principal
    A service principal can own the token instead of a person. A workspace admin creates its first token with databricks token-management create-obo-token, which the Databricks documentation describes.

    Step 3: Create a second token if Rig should ingest

    Skip this step if Rig only needs to read.

    1. Create another token for a user or service principal that can create and write tables in the catalog Rig loads into.
    2. Rig refuses a write token that matches the read one.

    Step 4: Connect it in Rig

    Adding a source needs a workspace owner, or a role with the Manage connections permission, on a workspace where you manage your own connections. If the Connectors tab says “Data ingestion for this workspace is managed by Rig”, ask an owner or Rig support to add the source.

    1. In Rig, open Connections. On a workspace with no warehouse yet, the page shows a Set up your warehouse card. Choose Bring your own warehouse.
    2. If the workspace already has a warehouse, open the Warehouse stage, click Change warehouse, choose Bring your own and pick the type. Your connected sources and schedules are kept, and data already synced is not copied across, so re-sync afterwards.
    3. Choose Databricks as the Warehouse type.
    4. Workspace hostname: the server hostname, such as adb-1234567890.11.cloud.databricks.com, without https://.
    5. SQL warehouse HTTP path: the HTTP path you copied, such as /sql/1.0/warehouses/abc123def456.
    6. Catalog: the Unity Catalog catalog Rig should read, for example main.
    7. Schema (optional): a default schema for unqualified table names and ingested tables. Leave it blank to use the catalog's own schemas.
    8. Personal access token: paste the token you generated.
    9. The credential fields appear once for the read credential, labelled with a (read) suffix. Rig only reads your warehouse unless you add a write credential.
    10. To let Rig also sync your connected tools into this warehouse, switch on Let Rig ingest data into this warehouse and fill the same credential fields again, now labelled (write / ingestion). The write credential must differ from the read one, and Rig blocks the form if they match.
    11. Click Provision workspace. Rig stores the credentials in AWS Secrets Manager and does not echo them back.
    12. To rotate a credential later, open the Warehouse stage and click Update credentials. Fill in only what you want to change and leave the rest blank.

    What Rig reads

    • Catalogs, schemas and tables: Rig reads the structure of the catalog you name and builds its context layer from it.
    • Views and dbt models: Views and the tables dbt builds are read like any other table, with dbt lineage kept alongside them.
    • Query results: Questions run as Databricks SQL on the warehouse you chose, and results go to the person asking.
    • Ingested sources: Only if you add a write token, Rig also creates a schema for each tool you sync.

    With only a read-only token Rig cannot create or change tables.

    Good to know

    • Databricks revokes a personal access token that has gone 90 days without use, so a quiet workspace can lose its connection. Create a new token and enter it with Update credentials.
    • Each token works for one workspace only, and a user can hold up to 600 per workspace.
    • Databricks recommends OAuth over tokens where possible, but Rig's form takes a token, so scope it to read access.
    • Questions run on the SQL warehouse you chose, so they use that warehouse's compute.
    • The token is stored in AWS Secrets Manager and is never logged.

    What people use this for

    • Let business teams query Databricks without writing SQL
    • Explore Databricks data inside Claude, Cursor or ChatGPT
    • Govern Databricks access with Unity Catalog carried through
    • Trace a metric back to its dbt model and source

    More ideas for using Databricks

    Was this guide helpful?