Databricks
Run SQL on a warehouse, start and follow jobs, manage clusters and pipelines, browse Unity Catalog, read the workspace and DBFS, and query model serving endpoints. Works with Databricks on AWS, Azure and GCP.
| Nodes | Databricks (actions), Databricks Trigger (polling) |
| Auth | Personal access token, or OAuth with your own Databricks app |
| Availability | All workspaces |
Connecting
Every credential needs the Workspace host, for example dbc-a1b2c3d4-e5f6.cloud.databricks.com or adb-1234567890123456.7.azuredatabricks.net. If you paste a full URL, Flero keeps only the host.
Personal access token (simplest)
- In Databricks, open Settings → Developer → Access tokens and generate a token.
- In Flero, choose the token auth type and paste the
dapi…token.
A service principal's token works the same way, and keeps working when the person who set it up leaves.
OAuth (user-to-machine)
- In the Databricks account console, register a custom OAuth app with the Redirect URL from Flero's credential dialog.
- In Flero, choose OAuth 2.0, enter the workspace host and the app's client ID (and secret, for a confidential app).
- Click Connect with Databricks.
Flero requests the all-apis and offline_access scopes by default.
What the workflow can do is whatever the token's or user's Databricks permissions allow.
Operations
| Resource | Operations |
|---|---|
| SQL | Execute SQL statement, Get statement, Cancel statement, Get result chunk |
| SQL warehouse | List warehouses, Get warehouse, Start warehouse, Stop warehouse |
| Job | List jobs, Get job, Create job, Delete job, Run job now |
| Job run | List runs, Get run, Get run output, Submit one-time run, Cancel run |
| Cluster | List clusters, Get cluster, Create cluster, Start cluster, Restart cluster, Terminate cluster, Permanently delete cluster, List runtime versions, List node types |
| Pipeline | Create pipeline, Delete pipeline, List pipelines, Get pipeline, Start pipeline update |
| Unity Catalog | List catalogs, List schemas, List tables, Get table |
| Workspace | List folder, Get object, Export notebook or file, Import notebook or file, Create folder, Delete object |
| DBFS | List directory, Get file info |
| Model serving | List endpoints, Get endpoint, Query endpoint |
| User | Get current user |
Warehouse, job, cluster, pipeline, catalog and serving endpoint fields are dropdowns filled from your workspace.
Running SQL
Execute SQL statement waits up to wait_timeout (default 30 seconds, maximum 50). If the statement finishes in time, the result comes back inline. If not, you get a statement_id to poll with Get statement.
Whenever a result is present, Flero adds rows: one object per row, keyed by column name, next to Databricks' own result.data_array. Read them with {{ $node["Daily Orders"].output.data.rows }}.
Pass values with :name markers in the SQL and the parameters list, rather than building the SQL string from expressions:
SELECT region, count(*) AS orders
FROM main.sales.orders
WHERE order_date = :day
GROUP BY regionJob output
Get run output needs a task run ID. If you pass a job run ID whose run has exactly one task, Flero looks up the task run for you. For a multi-task job, read tasks[].run_id from Get run and pass that.
Triggers
The Databricks Trigger polls List jobs or List runs. Use List runs to react to finished runs, for example filtered by job with completed_only on. Other operations are not offered as triggers.
Limits
- Cluster operations need a workspace with classic compute. A serverless-only workspace refuses Create cluster with "does not have any associated worker environments".
- Databricks omits empty lists from responses (
{}rather than{"jobs": []}). Check for a missing field, not just an empty one. - Databricks' own rate limits apply.
Common errors
| Symptom | Check |
|---|---|
401 |
The token expired or was revoked, or the host belongs to another workspace. |
403 |
The token's user or service principal lacks permission on the warehouse, job or catalog object. |
Statement returns no rows, only a statement_id |
It ran longer than wait_timeout. Poll with Get statement. |
| "Run was skipped" from Get run output | The run did not produce output, for example a condition task. |
Related
Found something out of date? This page lives in the Flero docs content set.