Published · By Henry Palma
Databricks Data Engineer Associate Exam Prep, Lesson 13: Lakeflow Jobs Tasks and Dependencies (Wire the Task Graph So Gold Waits for Silver)
Databricks Data Engineer Associate exam prep: wire notebook, SQL, dashboard and pipeline tasks in a Lakeflow Jobs task graph so gold never runs before silver.
Exam-style question: A nightly Lakeflow job has three tasks. ingestorders loads new files, silverorders cleans them, and golddailysales totals sales by day. Both silverorders and golddailysales depend only on ingestorders. Every run succeeds, but some mornings the gold totals are missing last night's orders. What should you change? Make golddailysales depend on silver_orders. Tasks with no dependency between them can run at the same time, so gold can read silver.orders before silver has finished updating it. This post follows Lesson 13 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).

The job definition, SQL files and cheat sheet are in the A13 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 lists this objective: configure common tasks (notebook, SQL query, dashboard, and pipeline tasks) and their dependencies using Lakeflow Jobs and its directed acyclic graph (DAG) based task graph.
A DAG is a set of tasks connected by one-way arrows with no loops. In Lakeflow Jobs, each arrow is a dependency: the downstream task waits for the upstream task. Databricks runs upstream tasks before downstream tasks and runs as many tasks in parallel as it can. That last part is the trap. A task with no arrow into it from silver does not wait for silver.
Free Edition works for this lesson. Free Edition runs jobs on serverless compute and includes one 2X-Small SQL warehouse for SQL and dashboard tasks. Its jobs limit is a maximum of 5 concurrent job tasks per account (Databricks "Free Edition limitations" page, checked Nov 29, 2026). That is a limit on tasks running at the same time, not on how many tasks a job can hold.
The four task types the exam names
| Task type | What it runs | Compute it needs | |---|---|---| | Notebook | A notebook, for example a Python ingest step | Serverless (the only option on Free Edition) or classic jobs compute | | SQL | A saved SQL query, a SQL alert, or a .sql file (several statements separated by semicolons) | A serverless or pro SQL warehouse | | Dashboard | Refreshes a published dashboard and can email a snapshot to subscribers | A serverless or pro SQL warehouse. If you pick none, it uses the dashboard's default warehouse | | Pipeline | Starts one update of an existing Lakeflow pipeline, optionally a full refresh | The pipeline's own settings. The pipeline definition owns its source code and compute |
A few details the exam likes:
- Jobs vs pipelines. Databricks describes Lakeflow Jobs as a procedural way to define relationships between tasks, and Lakeflow pipelines as a declarative way to define relationships between datasets. Inside a pipeline, the pipeline works out which table feeds which. Between tasks in a job, you draw the arrows yourself.
- A dashboard task needs a published dashboard. The person configuring the task needs at least CAN VIEW on it.
- A pipeline runs one update at a time. A job with a pipeline task is capped to a single concurrent run, even if
maxconcurrentrunsis higher. - Depends on only shows up with two or more tasks. If a task is selected in the graph when you add a new task, the new task depends on the selected one by default. That default is a common way to end up with gold depending on ingest instead of silver.
The scenario: a nightly orders job
The retail data from Lessons 8 to 12 continues. Every night a job should do four things in order:
ingest_orders(Notebook): load new order files intobronze.orders.silver_orders(SQL file): cleanbronze.ordersintosilver.orders.golddailysales(SQL file): totalsilver.ordersintogold.daily_sales.refreshsalesdashboard(Dashboard): refresh the published sales dashboard that readsgold.daily_sales.
The two SQL files are short:
-- 02_silver_orders.sql
CREATE OR REPLACE TABLE silver.orders AS
SELECT order_id, customer_id,
CAST(order_date AS DATE) AS order_date,
CAST(amount AS DECIMAL(10,2)) AS amount
FROM bronze.orders
WHERE order_id IS NOT NULL AND amount >= 0;
-- 03_gold_daily_sales.sql
CREATE OR REPLACE TABLE gold.daily_sales AS
SELECT order_date, COUNT(*) AS orders, SUM(amount) AS sales
FROM silver.orders
GROUP BY order_date;
The mistake: gold depends on ingest, not silver
Here is the broken graph. It looks reasonable, because gold does wait for something:
ingest_orders --> silver_orders
ingest_orders --> gold_daily_sales --> refresh_sales_dashboard
After ingestorders succeeds, silverorders and golddailysales both become ready, so Databricks can start them together. If gold reads silver.orders before silver has rewritten it, gold totals yesterday's silver data. Both tasks succeed, the run is green, and the dashboard shows numbers that are missing last night's orders. Retries do not help, because nothing failed. A larger SQL warehouse does not help either, because the problem is order, not speed.
The fix is one dependency. golddailysales depends on silver_orders, and the default Run if condition, All succeeded, means gold runs only after silver succeeds:
ingest_orders --> silver_orders --> gold_daily_sales --> refresh_sales_dashboard
In the Jobs UI: select golddailysales, open Depends on, remove ingestorders, add silverorders, and click Save task. In the Jobs API JSON, the same graph is a depends_on list on each task:
{
"name": "nightly_orders",
"tasks": [
{"task_key": "ingest_orders",
"notebook_task": {"notebook_path": "/Workspace/Shared/a13/01_ingest_orders"}},
{"task_key": "silver_orders",
"depends_on": [{"task_key": "ingest_orders"}],
"sql_task": {"file": {"path": "/Workspace/Shared/a13/02_silver_orders.sql", "source": "WORKSPACE"},
"warehouse_id": "WAREHOUSE_ID"}},
{"task_key": "gold_daily_sales",
"depends_on": [{"task_key": "silver_orders"}],
"sql_task": {"file": {"path": "/Workspace/Shared/a13/03_gold_daily_sales.sql", "source": "WORKSPACE"},
"warehouse_id": "WAREHOUSE_ID"}},
{"task_key": "refresh_sales_dashboard",
"depends_on": [{"task_key": "gold_daily_sales"}],
"dashboard_task": {"dashboard_id": "DASHBOARD_ID", "warehouse_id": "WAREHOUSE_ID"}}
]
}
WAREHOUSEID and DASHBOARDID are placeholders for your own IDs. If silver and gold were defined in a Lakeflow pipeline instead, a single pipeline task ("pipelinetask": {"pipelineid": "PIPELINE_ID"}) would replace the two SQL tasks, and the pipeline itself would order silver before gold.
Run if: what happens when an upstream task fails
Depends on sets the order. Run if sets the condition. The options are:
- All succeeded (default): run only if every dependency succeeded. Otherwise the task is marked
Upstream failed. - At least one succeeded and None failed: also marked
Upstream failedwhen not met. - All done: run after every dependency finishes, whatever the result. Good for cleanup.
- At least one failed and All failed: for failure handling. When not met, the task is marked
Excludedand skipped.
With the default, a failed silver_orders stops gold and the dashboard refresh, which is what you want: no refresh is better than a wrong one.
The checklist: before you save a job
- Task type. Notebook for Python ingest, SQL for queries and
.sqlfiles, Dashboard for a published dashboard refresh, Pipeline for a Lakeflow pipeline update. - Dependency. For every task, name the table it reads and make the task that writes that table one of its dependencies. Gold reads silver, so gold depends on silver.
- Compute. Notebook tasks on serverless (or jobs compute on paid plans). SQL and dashboard tasks on a serverless or pro SQL warehouse. Pipeline tasks use the pipeline's settings.
- Task count. Count how many tasks can run at the same time. On Free Edition, keep it at 5 or fewer, and remember the limit is per account, so other running jobs count too. Databricks documents a general limit of 1,000 tasks per job.
- Run if. Leave All succeeded for the main path. Use All done or At least one failed only for cleanup or alert tasks.
The reusable snippet checks a job's task list before you save it. It is plain Python and does not call Databricks:
def check_dag(tasks, must_wait=None, max_parallel=5):
keys = {t["task_key"] for t in tasks}
deps = {t["task_key"]: [d["task_key"] for d in t.get("depends_on", [])]
for t in tasks}
problems = [f"{k} depends on unknown task {d}"
for k, ds in deps.items() for d in ds if d not in keys]
depth = {}
def level(k, path=()):
if k in path:
raise ValueError("cycle: " + " -> ".join(path + (k,)))
if k not in depth:
depth[k] = 1 + max((level(d, path + (k,)) for d in deps[k] if d in keys),
default=0)
return depth[k]
for k in keys:
level(k)
widest = max(list(depth.values()).count(n) for n in set(depth.values()))
if widest > max_parallel:
problems.append(f"{widest} tasks can start together (Free Edition runs 5 at once)")
def upstream(k):
out = set()
for d in deps.get(k, []):
out |= {d} | upstream(d)
return out
for task, before in (must_wait or {}).items():
if before not in upstream(task):
problems.append(f"{task} does not wait for {before}")
return problems
Run against the broken task list with mustwait={"golddailysales": "silverorders"}, it returns ['golddailysales does not wait for silver_orders']. Against the fixed list it returns an empty list. An ingest task followed by 6 regional loads that all depend only on ingest returns ['6 tasks can start together (Free Edition runs 5 at once)']. Tasks at the same depth are only the ones that can start together, so treat that count as a quick warning, not an exact measure.
Free Edition: the five concurrent task limit
The Free Edition limit is a maximum of 5 concurrent job tasks per account. A straight chain of four tasks, like the nightly orders job, only ever runs one task at a time, so it is well under the limit. The limit matters when you fan out, for example one task per state or per store. Six regional load tasks that all depend only on ingest_orders would ask for six at once. Chain some of them, or use a For each task with a concurrency of 5 or less (control flow is Lesson 14). The docs do not say a job may only have five tasks, so do not confuse the limit with a task-count cap.
Practice exam-style question
A data engineer adds a notifyonfailure task to the nightly orders job. It depends on silverorders and golddaily_sales and should run only when at least one of them fails. On a good night it should not run. Which Run if condition should the engineer choose?
- A) All succeeded
- B) All done
- C) At least one failed
- D) None failed
Answer: C. At least one failed runs the task when any of its dependencies failed. When nothing failed, the condition is not met, so the task is marked Excluded and skipped. A is the default and would run the alert only on good nights, the opposite of what is needed. B runs after every dependency finishes whatever the result, so it would alert every night. D runs only when none of the dependencies failed.
Key takeaways
- The exam's four common task types: Notebook, SQL (query, alert or
.sqlfile), Dashboard (published dashboard refresh) and Pipeline (one Lakeflow pipeline update). - Depends on sets the order. Tasks with no dependency path between them can run at the same time.
- If gold reads silver, gold must depend on silver. A missing dependency gives a green run with stale gold, and retries or a bigger warehouse do not fix it.
- All succeeded is the default Run if condition. All done and At least one failed are for cleanup and alert tasks.
- Free Edition allows a maximum of 5 concurrent job tasks per account. It limits how many run at once, not how many a job can hold.
- Memory trick: no line, no wait. If there is no dependency line into a task, it does not wait.
Next lesson (Lesson 14): Jobs control flow: retries, If/Else and For Each.
Check your understanding
1. In Lakeflow Jobs, two tasks have no dependency path between them, and the tasks they depend on have succeeded. What can happen?
- A) They always run in alphabetical order
- B) They can run at the same time
- C) The job fails validation until you add a dependency
- D) They run in the order they were created
2. What is the default Run if condition for a task with dependencies?
- A) All done
- B) None failed
- C) All succeeded
- D) At least one succeeded
3. What is the Lakeflow Jobs limit on Databricks Free Edition?
- A) A maximum of 5 tasks in each job
- B) A maximum of 5 concurrent job tasks per account
- C) A maximum of 5 jobs per workspace
- D) Jobs are not available on Free Edition
4. Which task type refreshes a published dashboard, and what does it run on?
- A) Notebook task, on serverless compute
- B) Pipeline task, on the pipeline's compute
- C) Dashboard task, on a serverless or pro SQL warehouse
- D) Dashboard task, on any classic all-purpose cluster
5. Silver and gold are defined as tables in one Lakeflow pipeline. How should the nightly job run them?
- A) Add a pipeline task for the pipeline. The pipeline orders silver before gold itself
- B) Add one notebook task per table and no dependencies
- C) Add a dashboard task that reads the pipeline's tables
- D) Add a SQL task for gold that depends on nothing
Answer key
- B. Databricks runs as many tasks in parallel as it can. Only a dependency makes one task wait for another.
- C. All succeeded is the default. If a dependency fails, the task is marked
Upstream failedand does not run. - B. Free Edition allows a maximum of 5 concurrent job tasks per account. It is not a per-job task count.
- C. The dashboard task refreshes a published dashboard and needs a serverless or pro SQL warehouse.
- A. A pipeline task starts a pipeline update. Inside the pipeline, Databricks works out the order of the datasets.