CertSafari
    Databricks Certified Data Engineer Professional - October 9 onwards· Lessons

    Domain 1 · Lesson 5/45

    Lakeflow Jobs: build, trigger and parameterize ETL jobs from the UI, CLI and API

    Create and automate ETL workloads using Lakeflow Jobs via the UI, API, and CLI.

    21 min read
    1.92% of exam
    9 sources
    Published 22 Oct 2026
    Docs as of 17 Oct 2026

    What you will be able to do

    • Build a multi-task Lakeflow Job whose task graph uses depends_on and the right run_if condition
    • Choose a trigger (schedule, file arrival, table update, continuous) and explain how concurrency and pausing affect runs
    • Define job parameters and pass them, and run metadata such as {{job.start_time}}, into tasks with dynamic value references
    • Create, update and trigger a job with the Databricks CLI, the Jobs REST API and Declarative Automation Bundles, and say when to use run-now instead of submit

    Key concept

    Lakeflow Job — A job is a saved, named resource that holds a graph of tasks plus the settings that control when and how the graph runs: its trigger, its parameters, notifications and Git source. The UI, the CLI, the REST API and bundles all read and write this same definition.

    1.Jobs, tasks and the task graph

    Lakeflow Jobs is the Databricks orchestrator. It turns a set of notebooks, pipelines and queries into a single workflow that runs on its own schedule. A job can be one notebook, or it can be hundreds of tasks with dependencies between them. In both cases the job itself carries the settings that apply to the whole workflow: a trigger that decides when it runs, parameters that are pushed to its tasks at run time, notifications for failures or slow runs, and Git settings for task source code.

    A task is one unit of work. Each task has a task_key that is unique within the job, a type-specific block such as notebook_task, and a compute resource. With serverless compute, Databricks configures that compute for you. Tasks point at each other through depends_on, which forms a directed acyclic graph (DAG). Databricks runs upstream tasks before downstream ones, and runs as many in parallel as the graph allows. A job can hold up to 1,000 tasks.

    Common task types for ETL and what each one runs
    Task typeWhat it runs
    NotebookA Databricks notebook at a given path, with optional parameters read as widgets
    PipelineAn existing Lakeflow pipeline, such as one that maintains streaming tables or materialized views
    Python scriptA Python file, with parameters passed as command-line arguments
    Python wheelA packaged wheel; job-level parameters reach it as keyword arguments when it is configured to accept them
    SQLA SQL query, file or alert on a SQL warehouse
    If/else, For each, Run JobControl flow: branching, looping over an input array, or triggering another job

    In the workspace UI, you create a job by configuring its first task:

    1. Click Jobs & Pipelines in the sidebar, then Create > Job.
    2. Click the Notebook tile (or Add another task type), enter a task name, and pick the notebook for Path.
    3. Click Save task. The job appears as New Job <date> <time> until you rename it.
    4. Click Add task in the task graph to add more tasks. A task that is selected in the graph becomes the new task's default dependency.

    Without a trigger, a job runs only when someone starts it. Run now with different settings lets you change parameter values for a single run. The kebab menu next to Run now opens the job as YAML, and the job page shows the JSON definition used by the REST API get, create and reset endpoints. The If/else and For each task types are covered in control-flow tasks.

    Checkpoint 1 of 9· Match them up

    An ETL job needs several kinds of work. Match each task type to what it runs.

    Tap a term, then the definition that fits it.

    Sources123

    2.Dependencies and Run if conditions

    A task's run_if setting decides whether it runs once its upstream tasks have finished. In the UI this field is called Run if dependencies, and it only appears when the job has more than one task. The condition looks at the result of every task listed in depends_on, so one setting covers a task with two parents.

    The six Run if conditions, their API values, and the state a task gets when the condition is not met
    UI namerun_if valueRuns whenIf unmet
    All succeeded (default)ALL_SUCCESSEvery dependency ran and succeededUpstream failed
    At least one succeededAT_LEAST_ONE_SUCCESSAny dependency succeededUpstream failed
    None failedNONE_FAILEDNo dependency failed and at least one ranUpstream failed
    All doneALL_DONEAll dependencies have finished, whatever their outcomeNot applicable
    At least one failedAT_LEAST_ONE_FAILEDAny dependency failedExcluded (skipped)
    All failedALL_FAILEDEvery dependency failedExcluded (skipped)

    To report on a run whatever its outcome, use ALL_DONE. It runs the task once every parent has finished and ignores whether they succeeded. NONE_FAILED looks similar but is the wrong choice for this: if either parent fails, the reporting task never runs. AT_LEAST_ONE_FAILED is the opposite case. It suits an alerting or cleanup task that should run only when something went wrong. When a task is canceled, the cancellation propagates downstream, but tasks whose Run if condition handles failure still run. That is how a cleanup task survives a canceled run.

    Exclusion cascades through the graph. Upstream tasks marked Excluded count as successful when Run if conditions are evaluated. Upstream failed and Upstream canceled count as failed. A task whose dependencies are all excluded is itself excluded, whatever its own condition says. So in a chain A → B → C, excluding A means none of the three run.

    A task from `databricks jobs get` output: it depends on the task `success`, uses the default run_if, and sets retries and `disable_auto_optimization`json
    {
            "depends_on": [
              {
                "task_key": "success"
              }
            ],
            "disable_auto_optimization": true,
            "email_notifications": {},
            "max_retries": 3,
            "min_retry_interval_millis": 300000,
            "notebook_task": {
              "notebook_path": "/Workspace/Users/someone@example.com/directory",
              "source": "WORKSPACE"
            },
            "retry_on_timeout": false,
            "run_if": "ALL_SUCCESS",
            "task_key": "fail",

    Checkpoint 2 of 9· Fill the gap

    In this task from databricks jobs get output, the task fail should run only when every task in depends_on ran and succeeded. That is also what you get if you never change Run if. Which value fills the blank?

            "depends_on": [
              {
                "task_key": "success"
              }
            ],
            "disable_auto_optimization": true,
            "email_notifications": {},
            "max_retries": 3,
            "min_retry_interval_millis": 300000,
            "notebook_task": {
              "notebook_path": "/Workspace/Users/someone@example.com/directory",
              "source": "WORKSPACE"
            },
            "retry_on_timeout": false,
            "run_if": " ? ",
            "task_key": "fail",

    Checkpoint 3 of 9· Exam question

    A Lakeflow Job has a send_notification task that depends on the upstream validate_data and transform_data tasks. The team wants send_notification to run and report the job outcome after both upstream tasks finish, whether they succeeded or failed. Which run_if condition should be configured on send_notification's dependency on the two upstream tasks?

    Sources34

    3.Schedules and triggers

    A trigger turns a job that someone has to start by hand into one that runs on its own. You add one under Schedules & Triggers in the Job details pane, then pick a type. A schedule runs on the clock. The other types react to events: files landing, tables changing, or the previous run ending.

    Trigger types and when to use each for ETL
    TriggerStarts a run whenUse it when
    ScheduledA time-based schedule fires (Quartz cron plus a timezone)Data arrives on a known cadence, such as a nightly batch
    File arrivalNew files arrive in a monitored Unity Catalog storage locationUpstream systems drop files at unpredictable times
    Table updateSource tables are updatedThe job should follow upstream table commits rather than the clock
    ContinuousThe previous run completes or failsThe job must always be running
    None (manual)Someone clicks Run now or calls the APIAd hoc runs or an external orchestrator
    A schedule in the job JSON: run daily at 09:00:46 Los Angeles time, with one active run at mostjson
    "schedule": { "quartz_cron_expression": "46 0 9 * * ?", "timezone_id": "America/Los_Angeles", "pause_status": "UNPAUSED"},"max_concurrent_runs": 1,

    Concurrency is the setting most likely to catch you out. By default only one run of a job can be active at a time, and a run that would exceed max_concurrent_runs is skipped, not queued. If an hourly schedule fires while a slow run from the previous hour is still going, the new run is dropped unless you raise the limit in Advanced settings.

    Multiple triggers on one job are in Beta, with up to five per job. A common pattern is a table update trigger that starts the run as soon as data is ready, plus a scheduled trigger as a backup. Any active trigger that fires starts a run. Each trigger can be paused and resumed on its own. Pausing stops new runs but lets active runs finish. A continuous trigger cannot be combined with any other trigger. In the API, multiple triggers go in the triggers array, and that array must not be sent in the same request as the legacy schedule, trigger or continuous fields.

    Checkpoint 4 of 9· Check yourself

    A job should start as soon as its upstream source tables are updated. If no update arrives, it should still run once a day. Which trigger setup meets this requirement?

    Checkpoint 5 of 9· Check yourself

    A job runs on an hourly schedule and keeps the default concurrency setting. At 10:00 the schedule fires, but the 09:00 run is still processing. What happens to the 10:00 run?

    Sources5

    4.Job parameters and dynamic value references

    Job parameters are key-value pairs set once at the job level. They are pushed to every task that accepts key-value parameters, so one catalog or run_date setting reaches all tasks without being repeated on each. The value you configure is only a default. Run now with different parameters, or a run triggered through the REST API, can override it for that run. A task parameter with a static value, by contrast, can only change if you edit the task definition. Overriding a default is not locked down: anyone with CAN MANAGE RUN or higher on the job can do it, so restrict permissions if a value must not change.

    Dynamic value references are placeholders in double curly braces that are filled in when the job runs. They give you job metadata, such as {{job.id}}, {{job.run_id}}, {{job.trigger.type}} and {{job.start_time.<argument>}} (the UTC run start time in a format you choose, such as iso_date). They also give you parameters, through {{job.parameters.<name>}}, and results from other tasks, such as {{tasks.<task_name>.values.<value_name>}}. Event triggers add their own references. {{job.trigger.file_arrival.location}}, for example, tells a task which storage location fired the run.

    Job parameters whose defaults are dynamic: the job ID and the run's start datejson
    {
      "parameters": [
        {
          "name": "my_job_id",
          "default": "{{job.id}}"
        },
        {
          "name": "run_date",
          "default": "{{job.start_time.iso_date}}"
        }
      ]
    }

    References are resolved in the job and task configuration, not in your code. A notebook cannot read {{job.run_id}} directly. The reference has to sit in a parameter or field, which then passes the resolved value in, for example as a widget value for a notebook task. Resolution is plain text substitution: a task parameter set to job_{{job.run_id}} becomes job_550315892394120. You cannot run operations or call functions inside the braces.

    Loops have their own reference. A For each task passes each element of its input array to one iteration of its nested task. The nested task reads that element by setting a parameter value to {{input}}, or to {{input.<key>}} when the elements are objects. For an input of ["s3://raw/orders/", "s3://raw/customers/"], a notebook parameter source_path = {{input}} gets a different path on each iteration. Task values and job parameters feed the loop's Inputs box as a whole array, for example {{tasks.list_sources.values.paths}}. They do not feed individual iterations. The loop is covered in full in For each loops.

    Checkpoint 6 of 9· Check yourself

    Two notebook tasks and a Python wheel task (set up to accept keyword arguments) all need the same catalog value. An operator must be able to point a single run at a different catalog without editing the job. What should you configure?

    Checkpoint 7 of 9· Exam question

    An engineer builds a Lakeflow Job with a For each task whose input is a JSON array of ingestion source paths, for example ["s3://raw/orders/", "s3://raw/customers/", "s3://raw/products/"]. The nested task is a notebook task that reads the source path from a task parameter. How should that parameter be configured so each loop iteration processes its own array element?

    Sources6781

    5.Creating and running jobs with the CLI, REST API and bundles

    Every job is a JSON document. The UI, the Databricks CLI, the SDKs and the Jobs REST API all read and write that same document. The CLI wraps the REST API, so databricks jobs get maps to GET /api/2.2/jobs/get, and the jobs command group's create, get, delete and run-now commands map to the matching endpoints in the same way. databricks jobs <command-name> -h prints the syntax for any of them. Databricks recommends the CLI or an SDK over raw REST calls, unless your language has no SDK.

    A minimal job definition to save as a file and create with databricks jobs create --json @<file-path>json
    { "name": "My hello notebook job", "tasks": [ { "task_key": "my_hello_notebook_task", "notebook_task": { "notebook_path": "/Workspace/Users/someone@example.com/hello", "source": "WORKSPACE" } } ]}

    After databricks jobs create --json @<file-path>, there are three ways to run the job from the command line or the API:

    • Scheduled: if the JSON includes a schedule, the job runs on it automatically.
    • run-now (databricks jobs run-now, or jobs.run_now in the API): triggers a run of a job you have already created. Parameter overrides go here.
    • submit (databricks jobs submit, or jobs.runs.submit in the API): takes a job definition and runs it once. The job is never saved.

    To update an existing job, edit its JSON and send it to the reset endpoint. Reset replaces the settings wholesale, the same way an update to triggers replaces the whole array.

    For CI/CD, define the job as code instead of calling create from scripts. Declarative Automation Bundles describe jobs under resources.jobs in YAML, using the same task keys as the JSON, and keep them in source control next to the code they run. The deploy workflow is covered in deploying with bundles. Terraform is the other supported infrastructure-as-code route.

    A job declared as a bundle resource: a SQL task that runs a saved query on a warehouseyaml
    resources:
      jobs:
        my-sql-query-job:
          name: my-sql-query-job
          tasks:
            - task_key: my-sql-query-task
              sql_task:
                warehouse_id: 1a111111a1111aa1
                query:
                  query_id: 11111111-1111-1111-1111-111111111111

    Automation also runs into workspace limits. A workspace allows 2,000 concurrent task runs, and a run that cannot start immediately gets a 429 Too Many Requests response. A workspace can create at most 10,000 jobs per hour, and runs submit counts toward that limit. A workspace can hold up to 12,000 saved jobs. A pipeline that creates a new job on every commit, instead of updating one, will reach these limits.

    Checkpoint 8 of 9· Match them up

    A CI script manages an ETL job from the command line. Match each CLI command or API endpoint to what it does.

    Tap a term, then the definition that fits it.

    Checkpoint 9 of 9· Exam question

    A platform team wants to automate the creation and updates of Lakeflow Jobs from a CI/CD pipeline instead of configuring jobs by hand in the Jobs UI. Which of the following are valid, currently supported ways to do this? (Choose all that apply.)(Select 3)

    0 of 3 selected

    Sources921

    Practise it for real

    Create a one-task notebook job from a JSON file with the Databricks CLI, trigger it, and read back its definition.

    1. 1.Save the minimal job JSON (name "My hello notebook job", one notebook_task) to a file, pointing notebook_path at a notebook you own.

      Why: Every creation route takes the same job document, so the file is a reusable build artifact.

      You should see: A local JSON file with a name and a tasks array containing one task_key.

    2. 2.Run databricks jobs create --json @<file-path>.

      Why: The CLI wraps the jobs create REST endpoint and saves the job in the workspace.

      You should see: A response containing the new job_id. The job also appears under Jobs & Pipelines.

    3. 3.Run databricks jobs run-now with the job ID returned by create.

      Why: run-now triggers a run of a saved job, unlike submit, which runs an unsaved definition once.

      You should see: A run starts and is listed on the job's Runs tab.

    4. 4.Run databricks jobs get <job-id>.

      Why: get returns the stored settings, including defaults you did not set, such as run_if and max_concurrent_runs.

      You should see: JSON with settings.tasks[0].run_if set to ALL_SUCCESS and max_concurrent_runs set to 1.

    Stuck? Get a nudge

    If a command's syntax is unclear, run databricks jobs <command-name> -h.

    Sources

    (9)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “The tasks in a job are visually represented by a Directed Acyclic Graph (DAG).”
      ↩︎ Jobs, tasks and the task graph
      “When tasks use dynamic values in their parameters, job parameters are limited to 10,000 characters.”
      ↩︎ Job parameters and dynamic value references
      “A 429 Too Many Requests response is returned when you request a run that cannot start immediately.”
      ↩︎ Creating and running jobs with the CLI, REST API and bundles
      “A job is the primary resource for coordinating, scheduling, and running your operations.”
      ↩︎ Key concept
      “A pipeline task runs a pipeline. You can specify existing Lakeflow pipelines, such as a materialized view or streaming table.”
      ↩︎ Checkpoint
    2. 2.
      “Parameters configured at the job level are passed to the job's tasks that accept key-value parameters, including Python wheel files configured to accept keyword arguments.”
      ↩︎ Jobs, tasks and the task graph
      “If you prefer an infrastructure-as-code (IaC) approach to configuring jobs, you can use Declarative Automation Bundles.”
      ↩︎ Creating and running jobs with the CLI, REST API and bundles
      “Parameters configured at the job level are passed to the job's tasks that accept key-value parameters, including Python wheel files configured to accept keyword arguments.”
      ↩︎ Checkpoint
    3. 3.
      “Databricks runs upstream tasks before running downstream tasks, running as many of them in parallel as possible.”
      ↩︎ Jobs, tasks and the task graph
      “None failed: None of the dependencies failed, and at least one dependency was run.”
      ↩︎ Dependencies and Run if conditions
      “Upstream tasks with the Excluded result state are treated as successful when evaluating Run if conditions.”
      ↩︎ Dependencies and Run if conditions
      “All done: The task is run after all its dependencies have run, regardless of the status of the dependent runs.”
      ↩︎ Exam trap 1
      “All succeeded: All dependencies have run and succeeded. This is the default setting. The task is marked as Upstream failed if the condition is unmet.”
      ↩︎ Prediction
    4. 4.
      “ALL_DONE: Run when all dependencies complete, regardless of outcome.”
      ↩︎ Dependencies and Run if conditions
    5. 5.
      “By default, only a single run of a job can be active at a time.”
      ↩︎ Schedules and triggers
      “Runs are skipped when they exceed the configured max concurrency for a job.”
      ↩︎ Schedules and triggers
      “Don't set triggers in the same request as the legacy schedule, trigger, or continuous fields.”
      ↩︎ Schedules and triggers
      “A continuous trigger cannot be combined with any other trigger because the job already runs continuously.”
      ↩︎ Exam trap 4
      “you can use a table update trigger to start a job run when data is ready, and add an additional scheduled trigger as a backup”
      ↩︎ Checkpoint
    6. 6.
      “Job parameters are pushed down to tasks that use key-value parameters. Other tasks can reference job parameters using dynamic value references.”
      ↩︎ Job parameters and dynamic value references
    7. 7.
      “Dynamic value references must be defined using parameters or fields that pass context into tasks.”
      ↩︎ Job parameters and dynamic value references
      “Contents of the double curly braces are not evaluated as expressions.”
      ↩︎ Exam trap 2
      “Syntax errors, including non-existent dynamic reference values and missing braces, are silently ignored and treated as literal strings.”
      ↩︎ Prediction
    8. 8.
      “Use the {{input}} reference to set the value to the array value of each iteration”
      ↩︎ Job parameters and dynamic value references
    9. 9.
      “Because the CLI wraps the Databricks REST API, most CLI commands map to a REST API request.”
      ↩︎ Creating and running jobs with the CLI, REST API and bundles
      “Because they are not saved, submitted jobs can't be auto-optimized for serverless compute in case of failure.”
      ↩︎ Creating and running jobs with the CLI, REST API and bundles
      “With submit, the job is not saved, and isn't visible in the UI.”
      ↩︎ Exam trap 3
      “With submit, the job is not saved, and isn't visible in the UI. It runs once”
      ↩︎ Checkpoint

    Spotted a mistake, or was something unclear? Tell us.