Databricks Data Engineer Associate · Section 4 · 16% of the exam
Implement control flows (retries and conditional tasks such as branching and looping) using Lakeflow Jobs for pipeline orchestration.
One of the objectives of the Databricks Certified Data Engineer Associate exam, in the section “Working with Lakeflow Jobs”. Here is what it covers, the points to remember and a question to try.
What it covers
Dependencies, Run if conditions, If/else condition tasks and For each tasks turn a list of tasks into real control flow. Task values and dynamic value references move data between tasks, and retries and timeouts handle transient failures.
Points to remember
- Run if options: All succeeded (default), At least one succeeded, None failed, All done, At least one failed, All failed. API values: ALL_SUCCESS, AT_LEAST_ONE_SUCCESS, NONE_FAILED, ALL_DONE, AT_LEAST_ONE_FAILED, ALL_FAILED.
- If a success-type condition isn't met, the task becomes Upstream failed. If a failure-type condition (At least one failed or All failed) isn't met, the task becomes Excluded.
- When conditions are evaluated, Excluded upstream tasks count as successful, and Upstream failed or Upstream canceled tasks count as failed.
- The If/else condition task (
condition_task) usesop,leftandright. Downstream tasks setoutcome: "true"oroutcome: "false", and the branch that isn't taken is Excluded. ==and!=compare strings, while>,>=,<and<=compare numbers.
Try a question
A data engineer must run the same ingestion notebook for 30 source tables and pass a different table name to each run, without creating 30 separate tasks. Which task type should the engineer use?
- AA Run Job task that starts the ingestion job once and passes all 30 table names
- BAn If/else condition task that routes each table name to the ingestion notebook
- CA For each task with a nested notebook task that reads
{{input}} - DA Pipeline task with
full_refreshenabled and the 30 table names as pipeline parameters
Show the answer
C. A For each task runs its nested task once for each element of an input array. {{input}}, or {{input.<key>}} for object elements, passes the current element to the nested task as a parameter. The Concurrency setting controls how many iterations run in parallel.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Task Dependencies & Control Flow teaches this objective (about 55 minutes), and 17 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.
More in this section
- Configure common tasks (notebook, SQL query, dashboard, and pipeline tasks) and their dependencies using Lakeflow Jobs and its DAG-based task graph.
- 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.