Databricks
Databases Workspace URL and access tokenRun jobs, manage clusters and query SQL warehouses on Databricks from any Windmill script, flow or app.
Set up in 3 steps
Create a personal access token
In your Databricks workspace, open Settings then Developer, and generate an access token.
Add the resource in Windmill
Open Resources, add a resource of type databricks. Fill workspace_url with your workspace URL and token with the access token. For shared or scheduled flows, use a service principal's token rather than your own.
Run your first script
Fork any script below and read before writing anything.
Scripts
Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.
New Completed Job Run
Terminate Cluster
Stop SQL Warehouse
Start SQL Warehouse
Start Cluster
Run Job Now
List Workspace
List SQL Warehouses
List Tables
List Schemas
List Jobs
List Job Runs
List Clusters
List Catalogs
Import Workspace Object
Get Table
Get SQL Statement
Get Job Run
Get Job
Export Workspace Object
Execute SQL Statement
Cancel Job Run
Trigger flows from Databricks
Databricks is not only a destination. These inbound paths are supported today.
Completed job run (scheduled poll)
The New Completed Job Run trigger script polls the workspace and returns the job runs that finished since its last run, optionally for one job. To run it, open a flow, add a trigger and choose Scheduled Poll, then pick the trigger script and an interval. The steps after it run once per new item, and each flow keeps its own cursor.
Resource type
The shape of the credential every script on this page expects.
databricks
View raw schema →| Field | Type | Required | What it is |
|---|---|---|---|
| http_path | string | No | HTTP path of the SQL warehouse or cluster to run against, e.g. /sql/1.0/warehouses/a1b2c3d4e5f6. Found under the compute resource's Connection details. Required by dbt; not needed by the REST API. |
| token | string | Yes | Personal access token. Generate one under User Settings > Developer > Access tokens, or at https://<workspace_url>/settings/user/developer/access-tokens. |
| workspace_url | string | Yes | Workspace deployment URL, e.g. https://dbc-a1b2c3d4-e5f6.cloud.databricks.com (AWS), https://adb-1234567890123456.7.azuredatabricks.net (Azure), or https://1234567890123456.7.gcp.databricks.com (GCP). No trailing slash. |
Questions
What is http_path for?
The SQL warehouse or cluster a dbt run should target, found under its Connection details. The REST scripts here do not need it.
Everything 404s
Check workspace_url: every call goes to that host, so a URL from another workspace or cloud answers 404.
Is my token stored on the hub?
Never. It lives only in your own Windmill workspace, encrypted at rest.