# Databricks

Unified analytics platform

- Category: Data warehouses
- Runs in: the Phloem cloud

Lets you and Hamming query a Unity Catalog through a Databricks SQL warehouse, with its tables listed in Trace.

## What Phloem reads
- Tables in every schema of the catalog — columns, types, and comments and row counts where the table has them — listed in Trace for Hamming and SQL autocomplete
- `information_schema` is left out

## What you need
- Your workspace hostname and the SQL warehouse's **HTTP Path** (from its Connection Details)
- A personal access token, or a service principal's client ID and secret for OAuth
- The Unity Catalog to read

## Connect
1. In the console, open **Connectors**, choose **Add connector**, then **Databricks**.
2. Under **Authentication Method**, choose **API Key** or **OAuth (Service Principal)**.
3. Enter **Host** and **HTTP Path**.
4. In **Access Token**, enter the personal access token, or for OAuth the client secret plus **Client ID**.
5. Enter **Catalog**, and optionally a default **Schema**.
6. Choose **Test Connection**, then **Create Connection**.

## What Hamming can do
- Run SQL that you or Hamming write, on the warehouse at that **HTTP Path**

## Notes
- **Catalog** is optional on the form, but without it nothing is listed in Trace.
- A stopped warehouse can make the first test time out while it starts. Test again once it runs.
- Phloem runs any statement, not only `SELECT`. Use a token or service principal with read-only grants to keep the connector read-only.

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Host | Text | Yes | Databricks workspace URL |
| HTTP Path | Text | Yes | SQL Warehouse HTTP path from Connection Details |
| Access Token | Secret | Yes | Personal Access Token (for API Key) or Client Secret (for OAuth) |
| Client ID | Text | No | Service Principal Client ID (for OAuth only) |
| Catalog | Text | No | Unity Catalog name (optional) |
| Schema | Text | No | Default schema |
