Skip to main content
Databricks logo

Databricks

Lets an agent operate a Databricks workspace through the REST API: list clusters and jobs, trigger a job run and check its status, list SQL warehouses, run SQL statements through the Statement Execution API, and browse Unity Catalog catalogs and schemas.

What it can do

MethodWhat it does
databricks_clusters_listList all clusters with state, node type, and Spark version.
databricks_jobs_listList jobs (optional limit, offset, name filter).
databricks_job_run_nowTrigger a job run immediately, returning a run_id.
databricks_run_getGet the status and output of a job run.
databricks_warehouses_listList SQL warehouses with state and size.
databricks_sql_statementExecute a SQL statement on a warehouse and return columns/rows.
databricks_catalogs_listList Unity Catalog catalogs.
databricks_schemas_listList schemas inside a catalog.
databricks_requestGeneric passthrough to any REST endpoint for full API coverage.

How to get your token

Databricks authenticates API calls with a personal access token (PAT) sent as a Bearer token.

  1. Open your Databricks workspace.
  2. Click your avatar -> Settings -> Developer -> Access tokens (PAT docs).
  3. Click Generate new token, optionally set a comment and lifetime, and copy the token - it is shown only once.
  4. Note your workspace URL from the address bar, e.g. https://dbc-xxxxxxxx.cloud.databricks.com (no trailing /api).

Fields to fill

FlyMyAI fieldWhere it comes from
DATABRICKS_HOSTYour workspace URL, e.g. https://dbc-xxxxxxxx.cloud.databricks.com
DATABRICKS_TOKENSettings -> Developer -> Access tokens -> Generate new token (kept private)

Troubleshooting

  • 403 Forbidden / Invalid access token - the token is wrong, expired, or was revoked. Generate a new one and re-paste it.
  • PERMISSION_DENIED - the token's user lacks rights on that cluster, job, warehouse, or catalog. Use a token from a user with the needed permissions.
  • databricks_sql_statement returns PENDING / RUNNING - the query did not finish within the wait window. Increase wait_timeout (up to 50s) or fetch the result later by its statement_id via databricks_request.
  • RESOURCE_DOES_NOT_EXIST - the job_id, run_id, or warehouse_id is wrong. List first, then use the returned ids.
We love our partners - FlyMy.AI builds with the best. Thanks, Databricks!