What you will be able to do
- Configure a table update trigger to start a downstream job when any or all upstream tables change
- Choose between Minimum time between triggers and Wait after last change for bursty or batched arrivals
- Decide when a continuous job is preferable to a triggered one, and what it rules out
1.Expressing upstream table dependencies with a table update trigger
A pipeline dependency between jobs usually means that job B should process what job A wrote, as soon as A has written it. A Scheduled trigger can only approximate this by leaving a safety margin after A usually finishes. A table update trigger starts a Lakeflow job when monitored Unity Catalog tables change, so it expresses the dependency directly: point it at the tables that A produces.
When B reads several upstream tables, the Trigger when option defines when the data counts as ready. Choose All tables are updated if B's output only makes sense once every input is refreshed, such as a join across two feeds. Choose Any table is updated if each input is useful on its own. One trigger can monitor up to 10 managed or Delta tables.
The trigger also passes along what changed. Three dynamic value references become available as job parameter values, so downstream tasks can process just the new commits instead of rescanning everything.
Views need some care: - A trigger on a Unity Catalog view actually watches the view's source tables, and those tables count toward the 10-table limit. - Any change to a source table counts as an update to the view, so a run can fire for changes that the view's definition filters out. - Views that use read_files, depend on tables outside Unity Catalog, or depend on federated tables aren't supported. Creating the trigger still succeeds, but updates to those dependencies never start a run.
| Reference | Value |
|---|---|
| {{job.trigger.table_update.updated_tables}} | A JSON list of tables updated since the last job run |
{{job.trigger.table_update.<catalog.schema.table>.commit_timestamp.iso_datetime}} | The most recent commit timestamp that triggered the run |
{{job.trigger.table_update.<catalog.schema.table>.version}} | The most recent commit version that triggered the run |
Checkpoint 1 of 5· Check yourself
An engineer wants a table update trigger on a view that depends on 11 Unity Catalog tables. What happens?
Each of the view's source tables counts toward the limit of 10 per trigger, so a view over 11 tables exceeds it.
“Source tables for a view are counted towards the limit of 10 tables per trigger.”Source: docs.databricks.com
Sources1
2.Cooldown and debouncing: controlling how often data triggers fire
Data-driven triggers bring a problem that schedules don't have: data can arrive too often, or in pieces. File arrival and table update triggers both have two advanced options that control how changes turn into runs.
| Option | Pattern | Behaviour | Use it when |
|---|---|---|---|
| Minimum time between triggers in seconds | Cooldown | After a run completes, changes during the interval do not start a new run until it elapses | Frequent arrivals would otherwise create back-to-back runs |
| Wait after last change in seconds | Debouncing | Waits this long after the latest change; each new change resets the timer | Data lands in batches and the whole batch should be processed in one run |
The file arrival documentation gives worked examples: - Minimum time between triggers of 900 limits the job to one run per 15 minutes. - If a new batch of files starts about every 5 minutes, Wait after last change of 60 starts a run only after 60 seconds with no new files. This assumes files within a batch arrive less than 60 seconds apart, and batches are more than 60 seconds apart. - If you set both, the trigger waits for each batch to finish landing and never starts more than one run per 15 minutes.
The table update documentation describes using both options as a sequence: first the minimum time, then the wait after the last change. With a 120-second minimum and a 60-second wait, updates at 5 seconds and 115 seconds mean no run starts until after 175 seconds.
Checkpoint 2 of 5· Check yourself
Partner files arrive in bursts of about 40 files over 30 seconds, roughly every 10 minutes. Runs keep starting mid-burst and miss the later files. Which setting fixes this most directly?
Debouncing waits for a quiet period after the last file. 60 seconds is longer than the gaps between files in a burst and shorter than the gap between bursts.
“Use this option when files arrive in batches and you want to process the whole batch in a single run”Source: docs.databricks.com
3.Processing exactly what the file trigger found
A file arrival trigger starts the job, but it doesn't give the job a list of the new files. The documented pattern is to pair the trigger with Auto Loader in a notebook task. Point Auto Loader at the same URL as the trigger, and put its checkpoint location outside that path. Auto Loader finds what's new since the last run and processes it exactly once. A bounded streaming trigger makes the query stop once the backlog is processed, so each job run finishes cleanly and the next one starts on the next file arrival.
Checkpoint 3 of 5· Fill the gap
Which streaming trigger setting makes this Auto Loader query process the available files and then stop, so the triggered job run can finish?
streamingQuery = spark.readStream.format("cloudFiles") \
.option("cloudFiles.format", "json") \
.option("cloudFiles.schemaLocation", checkpoint_location) \
.option("cloudFiles.useManagedFileEvents","true") \
.load(file_location) \
.writeStream \
.option("checkpointLocation", checkpoint_location) \
.trigger( ? = True) \
.toTable(sink_table)availableNow processes all available files and then stops, which suits a job started by a file arrival trigger. The checkpoint makes sure the next run picks up only newer files.
Source: docs.databricks.comSources2
4.When to run continuously instead, and the overall decision
If data arrives constantly and latency matters more than cost, Databricks recommends a Continuous trigger for always-on streaming workloads. The trade-off is the same one described for pipelines. Continuous processing needs an always-running cluster, which costs more but reduces latency. Triggered processing runs only as long as each update takes.
Continuous jobs also have hard limits: - Only one instance of a continuous job can run at a time. - The gap between one run ending and the next starting should be under 60 seconds. - You can't set retry policies. Instead, the whole job retries automatically on failure, with exponential backoff. - You can't use task dependencies.
So a multi-task DAG whose tasks must run in order needs a triggered job, either scheduled or data-driven.
| Situation | Trigger to choose |
|---|---|
| Data arrives on a predictable cadence, or output is needed at a fixed time | Scheduled |
| Files land irregularly in a Unity Catalog volume or external location | File arrival |
| Job depends on tables written by other jobs or pipelines | Table update (Any or All tables) |
| Always-on streaming with low-latency needs and no task dependencies | Continuous |
Checkpoint 4 of 5· Exam question
An upstream partner team drops CSV extracts into an Amazon S3 external location at unpredictable times throughout the day, sometimes several times per hour and sometimes not at all. The ingestion job needs to start soon after each new file lands rather than waiting on a fixed schedule. Which trigger type best fits this requirement?
Correct answer: C — A file arrival trigger configured on the external location, so the job starts shortly after each new file is detected there.
- A. An hourly cron schedule fires at fixed intervals regardless of when files actually land, so it does not react promptly to arrivals between checks.
- B. A table update trigger watches Delta or Iceberg tables for changes, not raw files landing in S3, so it does not apply to monitoring CSV extracts in an external location.
- C. A file arrival trigger monitors the external location and starts the job shortly after new files are detected, matching the need to react to unpredictable file drops.
- D. A continuous trigger just restarts the job after each completion and is not tied to file detection, so it wastes compute rather than reacting specifically to new arrivals.
Checkpoint 5 of 5· Check yourself
A team wants a three-task job (ingest, then transform, then publish) to run as soon as new data lands, with minimal idle cost. Why is a Continuous trigger the wrong choice?
A continuous job can't have task dependencies, and it keeps compute running between runs. A file arrival or table update trigger is a better fit.
“You cannot use task dependencies with a continuous job.”Source: docs.databricks.com
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.Minimum time between triggers waits until a batch of files has finished landing.Why is that wrong?
Waiting for a batch to finish is what Wait after last change does: it resets its timer on every new arrival. Minimum time between triggers is a cooldown that limits how often runs can start after a run completes.
Covered in Cooldown and debouncing: controlling how often data triggers fire
2.A continuous job is the lowest-latency way to run a multi-task pipeline with ordered dependencies.Why is that wrong?
Continuous jobs don't support task dependencies. A multi-task DAG with ordered tasks needs a triggered job, such as one with a file arrival or table update trigger.
Covered in When to run continuously instead, and the overall decision
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“When selecting multiple tables, you can specify if a job is triggered when any or all of the tables are updated.”
↩︎ Expressing upstream table dependencies with a table update trigger“It is possible for a job run to be triggered for data changes that are filtered out by the view definition.”
↩︎ Expressing upstream table dependencies with a table update trigger“then the trigger waits the minimum time between triggers, and then waits the set amount of time after the last change”
↩︎ Cooldown and debouncing: controlling how often data triggers fire“The trigger can run when one table updates, or when all tables being monitored by the trigger are updated.”
↩︎ Prediction“Source tables for a view are counted towards the limit of 10 tables per trigger.”
↩︎ Checkpoint - 2.
“Waits this long after the most recent file arrives before starting a run, and each new arrival resets the timer (debouncing).”
↩︎ Cooldown and debouncing: controlling how often data triggers fire“Auto Loader incrementally and efficiently processes new files with exactly-once guarantees.”
↩︎ Processing exactly what the file trigger found“Limits the job to at most one run per this interval (a cooldown between runs).”
↩︎ Exam trap 1“Use this option when files arrive in batches and you want to process the whole batch in a single run”
↩︎ Checkpoint - 3.https://docs.databricks.com/aws/en/jobs/continuousOfficial docs
“Databricks recommends using continuous mode for always-on streaming workloads.”
↩︎ When to run continuously instead, and the overall decision“You cannot use task dependencies with a continuous job.”
↩︎ Exam trap 2“You cannot use task dependencies with a continuous job.”
↩︎ Checkpoint - 4.
“Continuous pipelines require an always-running cluster, which is more expensive but reduces processing latency.”
↩︎ When to run continuously instead, and the overall decision