Orchestrate Databricks jobs across your whole stack.
Databricks runs the compute. Kestra decides when a run starts, what feeds it, what checks it, and what runs next. Submit Databricks runs from a YAML flow, wait for them, gate on SQL checks, and chain them with ingestion, dbt and alerting in one execution history.
How do you orchestrate Databricks jobs with Kestra?
Kestra orchestrates Databricks from outside the workspace. A YAML flow submits a Databricks run with the SubmitRun task, waits for it to finish, runs SQL checks on a SQL warehouse, and chains the result with ingestion, dbt and alerting. Flows start on a schedule, a file arrival, a new Unity Catalog table or an API call.
Updated · Kestra 2.0
Kestra task
databricks.job.SubmitRun submits the run, waits for it, and adopts it after a worker loss
Starts on
A schedule, a file arrival, a new Unity Catalog table, a webhook or an API call
Runs on
Self-hosted (Docker, Kubernetes, air-gapped) or Kestra Cloud · Apache 2.0
Blueprints for Databricks orchestration.
Databricks Lakeflow Jobs schedule work inside the workspace. Kestra covers everything around it: it starts Databricks runs when upstream data is ready, runs SQL quality gates before anyone reads the result, creates and deletes clusters per run, and chains Databricks with Airbyte ingestion, dbt transforms and Slack alerts in one flow. Databricks keeps doing the compute; Kestra gives one execution history across every tool.
Run a job on an on-demand Databricks clusterOpen blueprint
Databricks runs the notebooks, the Spark code and the SQL warehouse. Kestra runs the steps around them: what triggers a run, what it depends on, which checks it must pass, and where the cross-tool audit trail lives.
Submit runs and wait, without duplicates
SubmitRun sends one or more tasks (notebook, Spark Python, Spark JAR, Spark Submit, Python wheel or pipeline) as a Databricks run and waits for a terminal state. The submission is idempotent: if the Kestra worker is lost mid-run, the resubmitted task adopts the run already in flight instead of launching a second one.
Event-driven starts, inside and outside Databricks
Start a flow when a new table appears in a Unity Catalog schema with the unitycatalog.table.Trigger, when a Lakebase query returns rows, or on events Databricks does not see: an S3 file, a Kafka message, a webhook, or another flow finishing.
One pipeline across ingestion, Databricks and dbt
Ingestion with Airbyte, the Databricks run, a dbt build and a notification run as ordered steps of one flow. A failed dbt step retries on its own; the Databricks run does not start again.
Ephemeral clusters per run
CreateCluster provisions a cluster, the job runs on it, and DeleteCluster removes it in the same flow, so compute exists only for the job. A scheduled audit flow can also find clusters left running outside working hours.
SQL quality gates before downstream reads
sql.Query runs checks on a cluster or SQL warehouse and returns the row count. A Fail or If task turns that result into a gate, so a bad load stops the pipeline instead of reaching dashboards.
Unity Catalog as code
Create and update catalogs, schemas, volumes and grants from a flow, read table metadata, and run compliance checks on permissions on a schedule. Every change lands in the execution history with the run that made it.
How do I orchestrate a Databricks job with Kestra?
Four steps take a Databricks job from a manual run to a scheduled, checked and alerted pipeline. The flow below puts them together.
Store the Databricks credentials as secrets
Save the workspace host and a personal access token (or an OAuth M2M service principal) as Kestra secrets, so no credential appears in the flow YAML.
Submit the run and wait for it
Use io.kestra.plugin.databricks.job.SubmitRun with an existing cluster or a cluster created in the same flow. waitForCompletion keeps the task running until Databricks reports a terminal state, and the run ID and console URL become task outputs.
Gate on a data quality query
Run a check with io.kestra.plugin.databricks.sql.Query on a SQL warehouse. If the query returns bad rows, a Fail task stops the flow before anything downstream reads the table.
Schedule it and alert on failure
Add a Schedule trigger, or start the flow on an event such as a new Unity Catalog table, an S3 file or a webhook. An errors branch posts to Slack with the execution ID when any step fails.
A complete flow: daily Databricks run, data quality gate, Slack alert on failure.
Patterns data platform teams run in production. Each one shows the flow end to end, with the real plugin classes in play.
Full pipeline
Ingest, transform in Databricks, then run dbt
Airbyte loads raw data, Kestra submits the Databricks transformation and waits for it, then runs dbt on the curated tables. Slack confirms or alerts. Each step retries on its own.
Run ID passed forward
The Databricks run ID and console URL are task outputs available to every later step.
Per-step retries
A dbt failure retries dbt only; the Databricks run is not resubmitted.
One execution history
Ingestion, compute and transformation share one execution ID and one log.
airbyte sync
ingest
databricks run
transform
dbt build
models
notify
Slack
Cost control
Ephemeral cluster for each run
Create a cluster sized for the job, run the job on it, and delete the cluster when the job ends, even if the job fails, so no cluster is left running between runs.
Cluster ID as an output
The job runs on the cluster the previous task created.
Cleanup on failure
The delete step runs even when the job fails.
Audit idle clusters
A scheduled flow lists clusters still running outside working hours.
schedule
nightly
create cluster
per run
run job
wait
delete cluster
always
Event-driven
React to a new Unity Catalog table
The Unity Catalog table trigger polls a schema and starts the flow when a table appears. The flow reads its metadata, runs a validation query and posts the result.
No polling script
The trigger stores the tables it has already seen in the KV Store.
Create or update
React to new tables, updated tables, or both.
Typed metadata
Column definitions come from the Get task, ready for checks.
table trigger
new table
get table
schema
validate
SQL check
notify
Slack
Kestra vs the orchestration options Databricks teams evaluate
File arrival and table update triggers on Databricks storage
Sensors and datasets
Sensors, Python required
Workflow definition
Declarative YAML
UI, JSON or Asset Bundles
Python DAGs
Python assets
Infrastructure and business steps in the same pipeline
Terraform, ServiceNow and 2,600+ plugins
No
Provider-dependent
Python code
Runs without a Databricks dependency
Self-hosted or cloud
Databricks only
Self-hosted or managed
Self-hosted or managed
Databricks & Kestra: common questions
Find answers to your questions right here, and don't hesitate to Contact Us if you couldn't find what you're looking for.
It depends on where the pipeline lives. If every step runs inside the Databricks workspace, Lakeflow Jobs (formerly Databricks Workflows) is the simplest choice. When the pipeline also involves ingestion tools, other warehouses, dbt, infrastructure or business systems, an external orchestrator fits better. Kestra does this in declarative YAML with native Databricks tasks; Airflow and Dagster do it in Python.
Lakeflow Jobs schedules and runs tasks inside one Databricks workspace. Kestra runs above it: it submits Databricks runs, waits for them, and chains them with steps Databricks does not run, such as Airbyte syncs, dbt builds, Terraform, ServiceNow tickets or Slack alerts, with one execution history across all of them. Kestra works with Databricks, not instead of it.
The SubmitRun and CreateJob tasks accept notebook, Spark Python, Spark JAR, Spark Submit, Python wheel and pipeline tasks. The plugin also runs SQL on clusters and SQL warehouses, the Databricks CLI, cluster creation and deletion, Unity Catalog operations, Lakebase queries and Genie questions.
Yes. The io.kestra.plugin.databricks.unitycatalog.table.Trigger polls a Unity Catalog schema and starts a flow for tables created or updated since the previous check, and the Lakebase trigger starts a flow when a SQL query returns rows.
Create the cluster in the flow with CreateCluster, run the job on it, and delete it with DeleteCluster at the end, including when the job fails. A separate scheduled flow can list clusters still running outside working hours and alert or terminate them.
No. Databricks keeps running the compute, the notebooks and the SQL warehouse. Kestra decides when Databricks work runs and connects it to the rest of the stack. Kestra is open source under Apache 2.0, runs self-hosted on Docker or Kubernetes or on Kestra Cloud, and has no dependency on Databricks to run.
Submit runs, gate on data quality, use ephemeral clusters, and chain Databricks with ingestion and dbt in one flow. Open source, self-hosted, event-driven.