# Databricks

Source: https://www.hyperagent.com/docs/integrations/databricks

> For AI agents: the documentation index is at https://www.hyperagent.com/llms.txt and the complete documentation in one file at https://www.hyperagent.com/llms-full.txt. Any docs page is also served as Markdown by appending `.md` to its URL.

Find the credentials you need to connect your Databricks workspace.

Connecting Databricks takes four pieces of information from your workspace: the host, a SQL warehouse ID, credentials, and (optionally) a default catalog and schema. Here's where to find each one.

### Find your workspace host URL [#find-your-workspace-host-url]

Log in to your Databricks workspace and look at the URL in your browser's address bar. It will look like:

```
https://dbc-abc123-def4.cloud.databricks.com
```

Copy the host portion **without** `https://` — for example `dbc-abc123-def4.cloud.databricks.com`.

If your workspace uses Azure Databricks, the host will look like `adb-1234567890123456.7.azuredatabricks.net`.

### Find your SQL warehouse ID [#find-your-sql-warehouse-id]

1. In the Databricks sidebar, click **SQL Warehouses** (under the "SQL" section).
2. Click the warehouse you want to use. If you don't have one, create a new SQL warehouse first.
3. Go to the **Connection details** tab and find the **HTTP Path** field. It will look like:

```
/sql/1.0/warehouses/a1b2c3d4e5f67890
```

The warehouse ID is the last segment after `/warehouses/` — here, `a1b2c3d4e5f67890`.

### Set up authentication [#set-up-authentication]

Choose one of the two methods:

1. Click your **profile icon** (top-right corner) and select **Settings**.
2. In the left sidebar, go to **Developer → Access tokens**.
3. Click **Generate new token**.
4. Give it a descriptive name (e.g., "Hyperagent"), set an expiration, and click **Generate**.
5. **Copy the token immediately** — it will only be shown once. The token starts with `dapi`.

1. In your Databricks **Account Console**, go to **Settings → App connections**.
2. Click **Add service principal** or use an existing one.
3. Under the service principal, go to **Secrets** and click **Generate secret**.
4. Copy the **Client ID** (UUID format) and the **Client Secret** (starts with `dose`).
5. Make sure the service principal has access to the SQL warehouse you want to use.

### Optional: catalog and schema [#optional-catalog-and-schema]

If you use **Unity Catalog**, you can specify a default catalog and schema to scope queries. To find your catalogs, go to **Data** in the Databricks sidebar and browse the catalog tree.

These fields are optional — if left blank, queries use the warehouse's default catalog and schema.

Once you have your credentials, return to the Databricks settings page in Hyperagent and enter them in the connection form.
