Skip to main content

At a glance

Credentials

Set these per environment. See Connect an integration.

Setup

  1. Get a workspace: If you don’t have one, sign up for the Databricks Free Edition at https://www.databricks.com/learn/free-edition, or use an existing workspace on AWS, Azure, or GCP.
  2. Find your workspace host: Copy the hostname from your workspace URL, e.g. dbc-a1b2345c-d6e7.cloud.databricks.com (AWS/GCP) or adb-1234567890123456.7.azuredatabricks.net (Azure). Set it as DATABRICKS_HOST (no https://).
  3. Generate a personal access token: In the workspace, click your username > Settings > Developer, click Manage next to Access tokens, then Generate new token. Name it, set a lifetime, and copy the token immediately.
  4. Store the credentials: Add DATABRICKS_TOKEN=<your token> and DATABRICKS_HOST=<your workspace host> to your .env file.
  5. Verify access: Run the List SQL Warehouses tool. A 401/403 means the token is invalid or expired, or token-based auth is disabled by your workspace admin.
  • Personal access tokens are workspace-scoped - the token only works against the workspace host where it was created
  • Executing SQL requires a running (or auto-starting) SQL warehouse; the first query may take a minute while the warehouse starts
  • Databricks recommends OAuth over PATs for production use; PATs are the simplest option for getting started
  • Tokens can expire - if calls suddenly return 403, regenerate the token
Provider API reference: https://docs.databricks.com/api/workspace/introduction

Tools

Example prompts

  • List my Databricks SQL warehouses, then run a SQL query I provide against one of them and summarize the results.
  • List my Databricks jobs and check the status of their most recent runs.
  • Show me the clusters in my Databricks workspace and which ones are currently running.