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.

In short

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
Query Databricks SQL and process the result in PythonOpen blueprint
Unity Catalog grant compliance gateOpen blueprint
Browse all 18 Databricks blueprints

Above the Databricks job scheduler.

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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.

How data teams use Databricks and Kestra

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.

Sync icon
airbyte sync
ingest
SubmitRun icon
databricks run
transform
DbtCLI icon
dbt build
models
SlackIncomingWebhook icon
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 icon
schedule
nightly
CreateCluster icon
create cluster
per run
CreateJob icon
run job
wait
DeleteCluster icon
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.

Trigger icon
table trigger
new table
Get icon
get table
schema
Query icon
validate
SQL check
SlackIncomingWebhook icon
notify
Slack

Kestra vs the orchestration options Databricks teams evaluate

Capability
Databricks Lakeflow Jobs
Apache Airflow
Dagster
Submit a Databricks run and wait for it
SubmitRun / CreateJob tasks
NativeDatabricks provider operatorsdagster-databricks integration
Steps outside Databricks (other clouds, on-prem, SaaS)
Native plugins in the same flow
Limited to workspace tasks and API callsProvider operatorsPython resources
Event triggers outside Databricks (S3, Kafka, webhooks)
Native triggers
File arrival and table update triggers on Databricks storageSensors and datasetsSensors, Python required
Workflow definition
Declarative YAML
UI, JSON or Asset BundlesPython DAGsPython assets
Infrastructure and business steps in the same pipeline
Terraform, ServiceNow and 2,600+ plugins
NoProvider-dependentPython code
Runs without a Databricks dependency
Self-hosted or cloud
Databricks onlySelf-hosted or managedSelf-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.

See How

Ready to orchestrate your Databricks pipelines?

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.