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

# Databricks

> Connect your Databricks lakehouse to Basedash

Connect your Databricks lakehouse to Basedash to analyze and visualize your data. Basedash connects directly to a Databricks SQL warehouse and queries your data in place.

## Prerequisites

* A Databricks workspace with a SQL warehouse (or an all-purpose cluster)
* A personal access token or service principal token with access to the data
* The server hostname and HTTP path for the SQL warehouse

## Connection setup

1. In Databricks, open your SQL warehouse and go to **Connection details** to find the server hostname and HTTP path
2. From your Basedash dashboard, click "Add Data Source"
3. Select "Databricks" as your data warehouse
4. Enter your connection details:
   * Server hostname (e.g., `adb-1234567890123456.7.gcp.databricks.com`)
   * HTTP path (e.g., `/sql/1.0/warehouses/xxxxxxxxxxxxxxxx`)
   * Access token
   * Catalog (optional, sets the default Unity Catalog catalog)
5. Click "Test Connection" to verify
6. Save your connection

## Required permissions

The token's identity needs:

* `CAN USE` on the SQL warehouse
* `USE CATALOG` and `USE SCHEMA` on the catalogs and schemas you want to analyze
* `SELECT` on the tables and views Basedash should see

## Best practices

* Use a service principal instead of a personal token
* Grant minimum required permissions through Unity Catalog
* Size the SQL warehouse and set auto-stop to control costs
* Regularly rotate access tokens

## Troubleshooting

* Verify the HTTP path points to a running SQL warehouse
* Check that the token has not expired
* Confirm Unity Catalog grants for the catalog, schema, and tables you expect to see
* Check workspace IP access lists allow connections from Basedash

## Next steps: Add custom context

You can add custom context to help the AI better understand your data structure and business logic. Consider adding context at the database or schema level if you notice the AI struggling to locate or understand specific data.

### When to add context

* **Complex transformed data**: When the AI needs help understanding data transformation logic
* **Business-specific metrics**: If calculated fields or KPIs need additional explanation
* **Unclear naming conventions**: When table or column names don't clearly indicate their purpose

For detailed guidance, see our [custom context documentation](/docs/features/custom-context).
