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

# Databricks

> Connect your Databricks lakehouse to query data with natural language

Connect Adapt to Databricks to query your lakehouse using natural language. Access Unity Catalog tables, run SQL queries, and analyze your data.

## Setup

<Steps>
  <Step title="Get your Databricks credentials">
    You'll need:

    * Workspace URL (e.g., `https://your-workspace.cloud.databricks.com`)
    * SQL Warehouse ID or Cluster ID
    * Personal Access Token
  </Step>

  <Step title="Create a Personal Access Token">
    1. In your Databricks workspace, go to **User Settings**
    2. Click **Developer** > **Access tokens**
    3. Click **Generate new token**
    4. Copy the token
  </Step>

  <Step title="Go to Settings">
    Navigate to **Settings > Integrations** in Adapt
  </Step>

  <Step title="Add the secrets">
    Add the following secrets:

    | Secret Name               | Value                       |
    | ------------------------- | --------------------------- |
    | `DATABRICKS_HOST`         | Your workspace URL          |
    | `DATABRICKS_TOKEN`        | Your personal access token  |
    | `DATABRICKS_WAREHOUSE_ID` | SQL Warehouse ID (optional) |
  </Step>

  <Step title="Test the connection">
    Ask Adapt to list your catalogs or tables
  </Step>
</Steps>

### Security Recommendations

* Use a dedicated service principal or user with minimal permissions
* Grant read-only access to specific catalogs/schemas
* Consider using Unity Catalog row-level security for sensitive data
* All queries are logged for audit purposes

## Capabilities

Adapt can query your Databricks lakehouse. Access Unity Catalog tables and run
SQL queries using natural language.

### Examples

Explore data:

```
What catalogs and tables are available?
```

Query data:

```
Show me a sample from the customers table
```

Analyze trends:

```
Find the top customers by revenue
```

Unity Catalog:

```
Describe the columns in the events table
```
