> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sqlbuild.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Databricks

> Databricks adapter configuration for SQLBuild.

Databricks requires the optional `databricks-sql-connector` dependency:

```bash theme={null}
pip install 'sqlbuild[databricks]'
# or
uv pip install 'sqlbuild[databricks]'
```

## Connection config

```toml theme={null}
adapter = "databricks"

[connection]
server_hostname = "my-workspace.cloud.databricks.com"
http_path = "/sql/1.0/warehouses/abc123"
token = "dapi_my_access_token"
catalog = "my_catalog"
schema = "my_schema"
```

| Field             | Description                                   |
| ----------------- | --------------------------------------------- |
| `server_hostname` | Databricks workspace hostname (required)      |
| `http_path`       | SQL warehouse or cluster HTTP path (required) |
| `token`           | Personal access token (required)              |
| `catalog`         | Unity Catalog name (required)                 |
| `schema`          | Default schema (optional)                     |

## Session initialization

On connect, SQLBuild runs `USE CATALOG` and `USE SCHEMA` statements to set the session context.
