CertSafari
    Databricks Certified Data Engineer Associate· Lessons

    Domain 4 · Lesson 18/33

    Lakeflow Jobs task dependencies: Depends on, Run if and the DAG

    Configure common tasks and their dependencies using Lakeflow Jobs

    10 min read
    4% of exam
    5 sources
    Published 2 Oct 2026
    Docs as of 30 Sep 2026

    What you will be able to do

    • Wire tasks together with Depends on and predict which tasks run in parallel
    • Choose the right Run if condition and predict when a task ends as Upstream failed or Excluded
    • Trace how excluded, canceled and disabled upstream tasks affect downstream tasks
    • Place If/else, For each and Run Job tasks in a DAG and know the pipeline-in-loop concurrency cap

    1.Depends on: drawing the DAG

    Dependencies are what turn a set of tasks into an execution order. Each task's Depends on field lists its upstream tasks, and the job DAG draws every dependency as a line between two tasks. The field only appears once the job has more than one task. If a task is selected in the DAG when you create a new task, the new task depends on the selected one by default.

    Databricks runs upstream tasks before downstream tasks and runs as many tasks in parallel as it can. Take the four-task example from the docs. Task 1 is the root. Tasks 2 and 3 both depend on Task 1, so they run side by side once it finishes. Task 4 depends on both of them. Tasks that have no dependency on each other don't wait for each other.

    Checkpoint 1 of 7· Exam question

    A job has a `load_customers` task and a `load_orders` task that both feed into a `reconcile` task, which should proceed only if both upstream loads completed without error. Which `Run if dependencies` setting on `reconcile` matches this requirement?

    Checkpoint 2 of 7· Put it in order

    Put the steps for editing a task's dependencies and its condition in order

    1. 1.Select one of the conditional options in the Run if dependencies field
    2. 2.In the Depends on field, remove upstream tasks or add them from the drop-down menu
    3. 3.Select a task
    4. 4.Click Save task

    Sources1

    2.The six Run if conditions

    Depends on decides *after which* tasks a task runs. Run if decides *whether* it runs, based on whether those upstream tasks succeeded, failed or finished. The default is All succeeded. The other conditions are what you use for fallback, alerting and cleanup paths.

    Run if conditions and the state of the task when the condition isn't met
    Run if conditionTask runs whenState if unmet
    All succeeded (default)All dependencies have run and succeededUpstream failed
    At least one succeededAt least one dependency succeededUpstream failed
    None failedNo dependency failed and at least one dependency ranUpstream failed
    All doneAll dependencies have run, whatever their statusNot applicable
    At least one failedAt least one dependency failedExcluded
    All failedAll dependencies failedExcluded

    Checkpoint 3 of 7· Match them up

    Match each Run if condition to the scenario it fits

    Tap a term, then the definition that fits it.

    Sources1

    3.Excluded, failed and canceled upstream tasks

    Yes. When Run if conditions are evaluated, an upstream task in the Excluded state counts as successful. Tasks marked Upstream failed or Upstream canceled count as failed, not as skipped.

    There is one exception. If *every* dependency of a task is excluded, the task is excluded too, whatever its Run if condition. That includes All done, which otherwise ignores upstream outcomes. This cascades down a chain: in A → B → C, excluding A excludes B, which excludes C.

    Cancellation also flows downstream. If you cancel a task run, the cancellation propagates through downstream tasks. Tasks whose Run if condition handles failure still run, which means a cleanup task still runs after a cancel.

    Checkpoint 4 of 7· Check yourself

    In a linear chain A → B → C, task A is Excluded. C uses the All done condition. What happens?

    Sources1

    4.Disabled tasks and their downstream tasks

    Disabling a task makes it skip at run time while keeping its configuration and run history. You might do this while debugging, or to keep a broken step from blocking a scheduled job. A disabled task finishes with a Disabled termination code. Each downstream task is then checked against its Run if condition, and if that condition can no longer be met, the downstream task is also disabled for that run. The key rule is that a disabled parent is never treated as a failure.

    Downstream behavior when a parent task is disabled
    Run if conditionEffect of a disabled parentExample
    All succeeded (default)Does not satisfy the succeeded requirementA (disabled) → B: B does not run
    At least one succeededB runs if at least one other parent succeededA (disabled) and C (succeeded) → B: B runs
    None failedB runs if at least one parent completed without failureA (disabled) and C (skipped) → B: B runs
    All doneTreated as doneA (disabled) → B: B runs
    At least one failedNot treated as a failureA (disabled) and C (failed) → B: B runs
    All failedNot treated as a failureA (disabled) → B: B does not run

    Checkpoint 5 of 7· Exam question

    A cleanup task should run after two independent ingestion tasks finish, but the cleanup logic itself is safe to execute whether the ingestions succeeded or failed. Which `Run if dependencies` value lets the cleanup task always execute once its dependencies are finished?

    In the job definition, only tasks you disable yourself carry the flag. Downstream disablement is worked out when each run is created and isn't stored in the job settings.

    Disabling is not the only way to skip a task. In Run now with different settings you can deselect a task, but that only affects that one run. Disabling skips the task on every run until you re-enable it.

    Checkpoint 6 of 7· Fill the gap

    Which field disables this task in the job settings?

    {
      "tasks": [
        {
          "task_key": "load_raw_data",
          " ? ": true,
          "notebook_task": {
            "notebook_path": "/Shared/etl/load_raw_data"
          }
        }
      ]
    }

    Sources23

    5.Branching, looping and calling other jobs

    Some task types exist only to shape the DAG. An If/else condition task runs one part of the graph or another depending on a boolean expression, for example running transformations only if ingestion added new data. Its condition can compare taskValues, job parameters or dynamic values using ==, !=, >, >=, < and <=. A For each task runs a nested task once for each element of an input array, and that array can be set by hand or generated at run time. A Run Job task starts another job in the workspace.

    These task types rely on their upstream tasks. If the upstream task that supplies an If/else condition or a For each input array is disabled, the If/else or For each task fails. Pipeline tasks have their own limit: a pipeline runs only one update at a time, so a pipeline task inside a For each runs only one iteration at a time.

    Checkpoint 7 of 7· Check yourself

    You loop a pipeline task over 20 parameter sets with a For each task whose concurrency is set to 10. How many iterations run at once?

    Sources421

    Exam traps

    Each one states something that sounds right. Open it to see what is actually true.

    1. 1.An Excluded upstream task counts as a failure, so it blocks a downstream task that uses All succeeded.Why is that wrong?

      Excluded upstream tasks count as successful when Run if conditions are evaluated. Only Upstream failed and Upstream canceled count as failed.

      Covered in Excluded, failed and canceled upstream tasks

    2. 2.Disabling a parent task sets off a downstream At least one failed or All failed handler.Why is that wrong?

      A disabled parent is not treated as a failure. A failure handler runs only if another parent actually failed.

      Covered in Disabled tasks and their downstream tasks

    3. 3.If a task's Run if condition isn't met, the task is always marked Upstream failed.Why is that wrong?

      Only conditions built around success mark the task Upstream failed. At least one failed and All failed mark it Excluded, and the task is skipped.

      Covered in The six Run if conditions

    Sources

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

    1. 1.
      “Databricks runs upstream tasks before running downstream tasks, running as many of them in parallel as possible.”
      ↩︎ Depends on: drawing the DAG
      “Depends on is only visible if the job consists of multiple tasks.”
      ↩︎ Depends on: drawing the DAG
      “your new task has a dependency configured on this task by default”
      ↩︎ Depends on: drawing the DAG
      “All dependencies have run and succeeded. This is the default setting.”
      ↩︎ The six Run if conditions
      “None of the dependencies failed, and at least one dependency was run.”
      ↩︎ The six Run if conditions
      “Upstream tasks marked Upstream failed or Upstream canceled are treated as failed, not as skipped.”
      ↩︎ Excluded, failed and canceled upstream tasks
      “If you cancel a task run, the cancellation propagates through downstream tasks”
      ↩︎ Excluded, failed and canceled upstream tasks
      “The Run Job task lets you trigger another job in your workspace.”
      ↩︎ Branching, looping and calling other jobs
      “Upstream tasks with the Excluded result state are treated as successful when evaluating Run if conditions.”
      ↩︎ Exam trap 1
      “At least one failed: At least one dependency failed. The task is marked as Excluded if the condition is unmet.”
      ↩︎ Exam trap 3
      “Select one of the conditional options in the Run if dependencies field.”
      ↩︎ Checkpoint
      “Tasks configured to handle failures are marked as Excluded if their Run if condition is not met.”
      ↩︎ Prediction
      “The task is run after all its dependencies have run, regardless of the status of the dependent runs.”
      ↩︎ Checkpoint
      “If all of a task's dependencies are excluded, the task itself is also excluded, regardless of its Run if condition.”
      ↩︎ Checkpoint
    2. 2.
      “A disabled parent task does not satisfy the succeeded requirement.”
      ↩︎ Disabled tasks and their downstream tasks
      “Lakeflow Jobs determines downstream disablement at run creation time and doesn't persist it in the job settings.”
      ↩︎ Disabled tasks and their downstream tasks
      “An If/else condition task fails if the upstream task that provides its condition value is disabled.”
      ↩︎ Branching, looping and calling other jobs
      “A disabled parent task is not treated as a failure.”
      ↩︎ Exam trap 2
    3. 3.
      “Deselecting a task only affects this run. To skip a task on every run without deleting it, disable the task in the job settings.”
      ↩︎ Disabled tasks and their downstream tasks
    4. 4.
      “You can define If/else conditions against taskValues, job parameters, or dynamic values.”
      ↩︎ Branching, looping and calling other jobs

    Also cited

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