Start Here
Your shop runs one DAG every day. Its name is shop_orders_daily.
A DAG is a set of tasks with an order. This one has two tasks.
The first, load_orders, copies the orders. The second, build_daily_revenue, builds the daily_revenue table.
Pipelines break. In this chapter you answer three questions:
- Where do you read what a task did?
- How do you get told, without too many alerts?
- What do you do first when a run goes wrong?
You know two things from earlier chapters. Data Observability & Monitoring taught freshness, volume and lineage. Reliability, Failure & Recovery taught failure modes, retries, backfills and runbooks.
This chapter shows the Airflow side of the same work.
A paid order counts as revenue. Refunded and pending orders do not. Every example uses these orders:
| id | customer_id | status | amount | order_date |
|---|---|---|---|---|
| 101 | 1 | paid | 40.00 | 2026-01-03 |
| 102 | 1 | paid | 25.00 | 2026-01-10 |
| 103 | 2 | refunded | 60.00 | 2026-01-11 |
| 104 | 3 | paid | 15.50 | 2026-01-15 |
| 105 | 3 | pending | NULL | 2026-01-20 |
| 106 | 4 | paid | 80.00 | 2026-01-21 |
Each run reads one day, called its data interval, as in Scheduling, Data Intervals & the Logical Date Trap. The run about 2026-01-20 reads order 105 and starts on 2026-01-21 00:00. The log lines, times and messages in this chapter are made up.
