← BuildandTeach Tech Tutorials posts

Published · By Henry Palma

Databricks Data Engineer Associate Exam Prep, Lesson 15: Job Triggers with Scheduled, File Arrival and Table Update (Let the Data Start the Job)

Databricks Data Engineer Associate exam prep: choose scheduled, file arrival or table update triggers for Lakeflow Jobs, and avoid a cron job that runs before the files land.

Databricks Data Engineer Associate Exam Prep, Lesson 15: Job Triggers with Scheduled, File Arrival and Table Update (Let the Data Start the Job)

Exam-style question: A job loads the orders files that a vendor drops into a Unity Catalog volume. It has a Scheduled trigger at 2:00 AM because the files usually land around 1:30 AM. On nights when the files land after 2:00 AM, the run still ends green, but the morning dashboard is missing a day of orders. What should you change? Replace the schedule with a file arrival trigger on the landing folder. The job then starts when new files actually arrive, instead of at a clock time that only guesses when the data is ready. This post follows Lesson 15 of the Databricks Data Engineer Associate exam prep series, in Section 4 of the August 2026 exam guide, Working with Lakeflow Jobs (16% of the exam).

Watch on YouTube

Video thumbnail
Video thumbnail

The job definitions, notebooks and cheat sheet are in the A15 folder on GitHub. The PDF cheat sheet is in the same folder. This is independent study material, not official Databricks training.

The exam objective

Section 4 of the exam guide has two objectives about triggers:

  • Implement job schedules using Lakeflow Jobs with an understanding of trigger types (scheduled, file arrival, and table update).
  • Choose between time-based and data-driven triggers based on data availability and pipeline dependencies.

The second one is the one that turns into scenario questions. A trigger decides when a job run starts. You add it in the job's Schedules & Triggers section with Add trigger, or with the schedule, trigger or continuous fields in the Jobs API.

| Trigger type | Starts a run when | Kind | |---|---|---| | Scheduled | A clock time or interval arrives | Time-based | | File arrival | New files land in a monitored Unity Catalog volume or external location | Data-driven | | Table update | A monitored source table is updated | Data-driven | | Continuous | The previous run finishes or fails, so the job is always running | Always on | | None (manual) | You click Run now or another tool starts it | Manual |

The docs also list model update and job completion triggers (both Beta). The exam objective names the first three, so they are the focus here.

Free Edition works for this lesson. The jobs limit on the Databricks "Free Edition limitations" page is a maximum of 5 concurrent job tasks per account, and that page does not list job triggers as unsupported (checked Dec 1, 2026). The file arrival trigger in this lesson watches a volume in the workspace catalog. Two related options are paid-plan features: external locations and file events need cloud storage that you connect yourself, and Free Edition does not support custom storage locations. So on Free Edition, file arrival triggers run without file events (the 50-job and 10,000-file limits below apply), and a table update trigger can monitor at most 10 tables.

The scenario: the orders files do not arrive on time

The retail orders data from Lessons 8 to 14 continues. A vendor drops the night's orders CSV files into the volume folder /Volumes/workspace/bronze/landing/orders/. Lessons 13 and 14 ran one nightly job: ingestorders -> silverorders -> golddailysales.

Most nights the files land around 1:30 AM, so someone scheduled the job for 2:00 AM. Some nights the vendor is late. On those nights the job starts at 2:00 AM, finds no new files, loads nothing, and ends green. The files land at 2:40 AM and sit there until the next night. The dashboard is a day behind and nothing failed, so nobody is told.

That is the trap: a schedule is a guess about when the data is ready. When the guess is wrong, the job does not wait. It just runs early.

This lesson splits the work into two jobs, each started by the data it needs:

Job 1  orders_ingest      trigger: File arrival on /Volumes/workspace/bronze/landing/orders/
       ingest_orders --> silver_orders              (writes workspace.silver.orders)

Job 2 ordersgold trigger: Table update on workspace.silver.orders golddailysales --> refreshsales_dashboard ```

The tasks are the same ones you built in Lessons 13 and 14. Only the triggers are new.

Scheduled triggers: the clock

A Scheduled trigger runs the job on a time-based schedule. It has two types:

  • Simple: an interval and unit, for example every 12 hours. You cannot pick the time of the first run. The scheduler chooses it when you save the schedule.
  • Advanced: a period, start time and time zone. Tick Show Cron Syntax to see and edit it as a Quartz cron expression.

Quartz cron has a seconds field first, so 2:00 AM every day is 0 0 2 ?. In the Jobs API:

{"schedule": {"quartz_cron_expression": "0 0 2 * * ?",
              "timezone_id": "UTC",
              "pause_status": "UNPAUSED"}}

Facts from the docs that are worth knowing:

  • Databricks enforces at least 10 seconds between runs started by a schedule, whatever the cron expression says.
  • In a time zone with daylight saving time, an hourly job can be skipped or look delayed by an hour or two when the clocks change. For every hour in absolute time, choose UTC.
  • The scheduler is not meant for low-latency jobs. A run can occasionally start up to several minutes late because of network or cloud issues.

A schedule is the right choice when the data is ready at a known time, or when the business wants a run at a fixed time, for example a report that must go out at 6:30 AM. It is the wrong choice when the data arrives at irregular times.

File arrival triggers: start when the files land

A file arrival trigger starts a run when new files arrive in a Unity Catalog volume or external location. The docs describe it as useful "when a scheduled job's efficiency is compromised by irregular new data arrivals", which is exactly the late-vendor problem.

To add it in the UI: open the job, click Add trigger, choose File arrival as the trigger type, enter the storage location, optionally open the advanced options, click Test connection, then Save. In the Jobs API:

{"trigger": {"pause_status": "UNPAUSED",
             "file_arrival": {
               "url": "/Volumes/workspace/bronze/landing/orders/",
               "wait_after_last_change_seconds": 60}}}

How it works, from the docs:

  • It checks for new files about every minute (best effort), and it checks all subfolders of the path recursively.
  • The path is the root or a subpath of a volume or external location. It cannot contain wildcards such as * or ?.
  • Only new files start runs. Overwriting an existing file with a file of the same name does not start a run (there is an exception for locations with file events enabled, when the file's metadata is older than the retention period). So ask the vendor for unique file names, such as a date in the name.
  • You need READ on the storage location and CAN MANAGE on the job, and Unity Catalog must be enabled.
  • Without file events enabled on the location, a workspace can have at most 50 jobs with a file arrival trigger on such locations, and the monitored path can hold up to 10,000 files.
  • The trigger itself adds no cost beyond the cloud provider's cost of listing the files.

Two advanced options control how many runs you get:

  • Wait after last change in seconds waits this long after the latest file before it starts a run, and each new file resets the timer. Use it when files arrive in a batch. Our vendor drops several files within a few seconds of each other, so 60 seconds means one run for the whole batch instead of a run per file.
  • Minimum time between triggers in seconds is a cooldown: at most one run per interval. 900 means no more than one run every 15 minutes.

The trigger only says "new files are here". The job still has to load only the new rows. The ingestorders task from Lesson 14 already does that with a MERGE on orderid, and the docs suggest Auto Loader (Lesson 4) to process the files that started the run, because it keeps track of the files it already loaded.

Table update triggers: start when the upstream table changes

A table update trigger starts a run when a monitored table is updated, for example by a write, a merge or a delete. It fits the gold job: gold should refresh when silver.orders has new data, whoever wrote it.

To add it: open the job, click Add trigger, choose Table update, add the tables under Tables, then click Test trigger and Save. In the Jobs API:

{"trigger": {"pause_status": "UNPAUSED",
             "table_update": {
               "table_names": ["workspace.silver.orders"],
               "condition": "ANY_UPDATED"}}}

What the docs say you need to know:

  • It can monitor Unity Catalog managed Delta and Iceberg tables, external Delta tables, materialized views, streaming tables, and views that depend on supported tables.
  • With more than one table, Trigger when chooses between Any table is updated (ANYUPDATED) and All tables are updated (ALLUPDATED).
  • A trigger can monitor up to 25 tables. More than 10 tables requires file events on every monitored table.
  • The identity in the job's Run as field needs SELECT on each monitored table, plus USE CATALOG and USE SCHEMA. Without it, the trigger fails to evaluate and the job does not run.
  • It has the same two advanced options, Minimum time between triggers and Wait after last change.
  • The run can read which tables changed through the dynamic value reference {{job.trigger.tableupdate.updatedtables}}.

Why not just add golddailysales to the end of Job 1? You can, and Lesson 13 did. A table update trigger is the better fit when silver.orders has more than one writer, such as a manual backfill or another team's job, or when the gold team owns a separate job. Gold then follows the table, not one particular job.

Continuous: the always-on job

Continuous mode starts a new run as soon as the previous one finishes or fails. Databricks recommends it for always-on streaming workloads. The facts that show up in questions:

  • Only one instance of a continuous job can run at a time, and the gap between runs should be under 60 seconds.
  • You cannot use task dependencies or retry policies in a continuous job. It retries the whole job with exponential backoff, and the Task retry mode (default On failure) retries failed tasks.
  • On serverless compute, which is all Free Edition has, continuous jobs work with bounded streaming triggers such as Trigger.AvailableNow. Time-based streaming triggers are not supported on serverless.

A nightly batch of files is not an always-on stream, so continuous is not the answer for this scenario.

Two more things worth knowing

  • Multiple triggers (Beta). A job can have up to five triggers during the Beta, and any one of them starts a run. The docs give the example of a table update trigger plus a scheduled trigger as a backup. A continuous trigger cannot be combined with others.
  • One run at a time by default. Only one run of a job can be active unless you raise the maximum concurrent runs. If queueing is disabled, runs from most trigger types are skipped when they would go over that limit.

The checklist: choosing a trigger

Before you save a job, answer these in order:

  1. What tells you the data is ready? Files landing points to a file arrival trigger. A table being updated points to a table update trigger. Only a known, reliable time points to a schedule.
  2. Is the time fixed by the business? A report due at 6:30 AM is time-based on purpose. Use a schedule, and make sure the data is ready before then.
  3. Do files come in a batch? Set Wait after last change so one batch makes one run. Add Minimum time between triggers to cap how often the job runs.
  4. Who writes the upstream table? If more than one job or person does, trigger the downstream job on the table, not on one upstream job's schedule.
  5. Is it safe to run twice? Data-driven triggers can start more runs than a nightly schedule. Keep the load idempotent (Lesson 14): MERGE on a key, COPY INTO or Auto Loader.
  6. Is it really always on? Only a streaming workload that should never stop gets a continuous trigger.

The reusable snippet turns that checklist into a Jobs API trigger block. It is plain Python and does not call Databricks:

def choose_trigger(path=None, table=None, ready_at=None,
                   batch_wait_s=None, always_on=False, tz="UTC",
                   when="ANY_UPDATED"):
    """Return a Jobs API trigger block. Data-driven first, the clock last."""
    if always_on:                       # always-on streaming
        return {"continuous": {"pause_status": "UNPAUSED"}}
    if path:                            # files land in a volume
        fa = {"url": path}
        if batch_wait_s:                # wait for the whole batch
            fa["wait_after_last_change_seconds"] = batch_wait_s
        return {"trigger": {"pause_status": "UNPAUSED", "file_arrival": fa}}
    if table:                           # an upstream table commits
        names = [table] if isinstance(table, str) else list(table)
        return {"trigger": {"pause_status": "UNPAUSED", "table_update": {
            "table_names": names, "condition": when}}}
    if ready_at:                        # data is reliably ready by HH:MM
        h, m = ready_at.split(":")
        return {"schedule": {"quartz_cron_expression": f"0 {int(m)} {int(h)} * * ?",
                             "timezone_id": tz, "pause_status": "UNPAUSED"}}
    raise ValueError("Say how the data becomes ready")

choosetrigger(path="/Volumes/workspace/bronze/landing/orders/", batchwaits=60) returns the file arrival block for Job 1. choosetrigger(table="workspace.silver.orders") returns the table update block for Job 2. choosetrigger(readyat="06:30") returns the schedule 0 30 6 ?. With no readiness signal at all it raises an error, which is the point: decide what "ready" means before you pick a trigger. I checked that each block parses with the Databricks SDK for Python's JobSettings. That checks the field names only, not a run.

Practice exam-style question

The ordersgold job runs golddailysales and then refreshes the sales dashboard. workspace.silver.orders is written by the file-triggered ordersingest job, and sometimes by a manual backfill that a data engineer runs during the day. Gold must refresh after every change to silver.orders, and should not run when nothing changed. Which trigger should orders_gold use?

  • A) A Scheduled trigger 30 minutes after the usual ingest time
  • B) A file arrival trigger on /Volumes/workspace/bronze/landing/orders/
  • C) A table update trigger on workspace.silver.orders
  • D) A continuous trigger

Answer: C. A table update trigger starts the job when the monitored table is updated, no matter which job or person wrote it, so both the nightly load and the backfill refresh gold, and nothing runs when the table did not change. A is a time-based guess that runs even on quiet days and misses daytime backfills. B fires when files land, before silver_orders has written anything, and it never sees the backfill. D keeps the job running all the time, which is meant for always-on streaming, not a refresh after an update.

Key takeaways

  • Section 4 names three trigger types: scheduled (time-based), file arrival and table update (data-driven). Continuous is for always-on streaming.
  • Choose the trigger from what tells you the data is ready. A schedule is a guess. When the files are late, a scheduled job still runs, finds nothing and ends green.
  • File arrival triggers watch a Unity Catalog volume or external location, check about every minute, fire only for new files, and use Wait after last change to turn a batch into one run.
  • Table update triggers watch Unity Catalog tables, can wait for any or all of them, and need SELECT for the job's Run as identity.
  • Memory trick: schedules guess, data triggers know. If the data decides when it is ready, let the data start the job.

Next lesson (Lesson 16): Managed vs. external tables.

Check your understanding

1. A vendor drops 6 order files into the landing folder within about 20 seconds, once a night. You want one job run per night, not six. Which file arrival setting fits best?

  • A) Wait after last change in seconds set to 60
  • B) Minimum time between triggers in seconds set to 10
  • C) A Quartz cron expression of 0 0 2 ?
  • D) Max concurrent runs set to 6

2. Every night the vendor overwrites /Volumes/workspace/bronze/landing/orders/orders.csv with a new file of the same name. The file arrival trigger, on a location without file events, never starts a run. Why?

  • A) File arrival triggers only work on external locations
  • B) Only new files start runs, and overwriting a file with the same name does not count
  • C) The trigger checks for files only once a day
  • D) CSV files are not supported by file arrival triggers

3. A table update trigger monitors workspace.silver.orders and workspace.silver.customers. The gold job should run only after both tables have been updated. What do you set?

  • A) Trigger when: Any table is updated
  • B) Trigger when: All tables are updated
  • C) Two separate jobs, one per table
  • D) A Scheduled trigger with Show Cron Syntax ticked

4. Which statement about continuous jobs is true?

  • A) A continuous job can run several instances at the same time
  • B) A continuous job uses task dependencies like any other job
  • C) You cannot use task dependencies or retry policies in a continuous job
  • D) Continuous jobs are the recommended choice for a nightly batch of files

5. Which storage location is NOT valid for a file arrival trigger?

  • A) /Volumes/workspace/bronze/landing/
  • B) /Volumes/workspace/bronze/landing/orders/
  • C) /Volumes/workspace/bronze/landing/orders/*.csv
  • D) The root of a Unity Catalog external location

Answer key

  1. A. Each new file resets the wait timer, so the run starts once 60 seconds pass with no new files, after the whole batch has landed.
  2. B. Only new files trigger runs. Overwriting an existing file with the same name does not, so use unique file names.
  3. B. All tables are updated waits for every monitored table. Any table is updated would start a run after either one.
  4. C. Continuous jobs allow one running instance, cannot use task dependencies or retry policies, and are meant for always-on streaming.
  5. C. The trigger path cannot contain wildcards such as * or ?. It watches the root or a subpath of a volume or external location, including subfolders.

Have an idea, question, or feedback?

We'd genuinely like to hear from you.