Run Databricks Job & Wait
Trigger a Databricks Job by ID, poll the run to completion, then branch on whether it succeeded — the pre-wired pairing of Run Job and Get Job Run.
Trigger a Databricks Job by ID, poll the run to completion, then branch on whether it succeeded — the pre-wired pairing of Run Job and Get Job Run.
Prerequisites: Connect Databricks before adding this recipe. See Integrations.
How it works
Each box is a block; arrows show the order Stylo runs them, and branch labels show the path taken on each outcome.
Parameters
Set these when you add the recipe to your workspace:
| Parameter | Type | Default |
|---|---|---|
job_id | string | — |
poll_interval_ms | number | 10000 |
Blocks used
Every block in this recipe, linked to its reference page where one exists:
| Block | Type | What it does |
|---|---|---|
| Schedule | trigger/schedule | Trigger workflow on a cron schedule |
| Run Job | databricks/run-job | Trigger an existing Databricks Job by ID (run-now). Returns immediately with the run ID — pair with Get Job Run to poll for completion. |
| Loop | system/loop | Iterate over items, a fixed count, or while a condition is true |
| Get Job Run | databricks/get-job-run | Fetch the status (and optional output) of a Databricks job run. Poll this until isTerminal is true. |
| Delay | system/delay | Pause the workflow before continuing. Top-level delays use durable execution and may run for minutes; delays inside a loop are short (≤30s). |
| Condition | system/condition | Branch the workflow based on a boolean expression |
When to use it
Use this when a workflow needs a Databricks Job to finish before it continues — not just fire it off. It triggers the job, polls the run until it reaches a terminal state, then branches on whether the run succeeded, so downstream steps only act on a completed result.
Adapt it
This recipe is a starting point. To fit it to your workspace:
- Set the
job_idparameter to the numeric ID of the Databricks Job you want to run. - Tune the
poll_interval_msparameter to control how long the loop waits between status checks (in-loop delays are capped at 30 seconds). - Raise or lower the Poll Until Complete loop's max-iterations cap to match how long the job can reasonably run before you give up.
- Fill in the Succeeded? branches with what should happen on success (e.g. read
Get Final Result.output) versus failure (e.g. alert onresultState).