Week 11 - Orchestration

Introduction to Orchestration

Airflow Fundamentals

Scheduling and Triggers

Sequential Pipeline Steps

Parameterized Runs and Backfills

Testing DAGs

Monitoring and Debugging

Deploying to Shared Airflow

Practice

Gotchas & Pitfalls

Assignment: Build an Orchestrated Data Pipeline

Week 11 Lesson Plan (Teachers)

Week 11 Lesson Plan (Teachers)

This class moves students from "pipeline scripts" to "operated workflows." The goal is for every student to leave with a working Airflow DAG that runs locally, supports reruns, can be debugged confidently, and (at Target tier) deploys to the shared class Airflow.

Teaching focus for this cohort: many learners are changing careers and may still be building confidence with technical vocabulary. Keep explanations concrete, repeat key terms, and show one full example before asking students to generalize.

Goals

By the end of class, students should be able to:

Schedule (3 hours total)

Time Activity Duration
0:00 Welcome + Week 10 recap 10 min
0:10 Concept intro: orchestration, DAGs, logical date, {{ ds }} 20 min
0:30 Live demo: first DAG in Astro (build, unpause, trigger, inspect logs) 25 min
0:55 Break 10 min
1:05 Workshop: build sequential + {{ ds }}-parameterized DAG 45 min
1:50 Debug lab: intentional failure + log-reading 25 min
2:15 Break 5 min
2:20 Live demo: deploy to shared Airflow (Ch8 flow, PR to merge to see in UI) 20 min
2:40 Gotchas walkthrough + runbook prompt 10 min
2:50 Assignment briefing + Q&A 10 min
3:00 End

Total: 3 hours

Inclusion and accessibility strategy

Confidence checkpoints

Use quick check-ins after each major block:

  1. Thumb check (30 seconds): clear / partly clear / blocked.
  2. One-minute recap: one student explains the concept in plain words.
  3. Reset point: if many are blocked, pause and rerun the demo slowly.

Pre-class preparation checklist

Live demo plan

Demo 1: Airflow basics (Astro UI), 25 min

  1. Start local Astro: astro dev start from a scratch project.
  2. Open the Airflow UI. Walk through DAG list, Graph view, Grid view, task logs, Rendered Template tab.
  3. Trigger the hello_pipeline DAG (Ch2 snapshot) manually.
  4. Show dependency order and successful task states.
  5. Point out the Rendered Template tab on a task to preview where {{ ds }} gets substituted; this sets up the debugging demo later.

Demo 2: Debugging a real failure (part of the Debug lab at 1:50), 25 min

  1. In the student workshop's DAG, inject a typo: add _typo suffix to the parquet URL.
  2. Trigger the DAG. Watch ingest_taxi_month go red and dbt_run / dbt_test go upstream_failed.
  3. Open the task log, scroll to the bottom, then read upward. The useful line is HTTPError: 403 Client Error: Forbidden for url:, not the generic "Task failed with exception" above it.
  4. Revert the typo. Clear the failed task. Re-trigger. Everything goes green.
  5. Land the takeaway: "Retries do not fix 403. You need to fix the code."

Demo 3: Deploy to the shared Airflow (Ch8 flow), 20 min

  1. Starting from your local class-airflow-reference checkout, copy a class-demo DAG into dags/ (top level, above student subdirs).
  2. Commit and push to a branch, open a PR, merge it.
  3. Open the shared Airflow UI in the browser. Filter by the teacher tag.
  4. Wait ~60 seconds: the cron on the VM runs git pull, the dag-processor re-parses, and the DAG appears.
  5. Unpause, trigger. Tasks go green.
  6. Land the takeaway: "This is what shared production looks like. Students will follow the same flow for their assignments."

Workshop instructions (45 min)

Students extend the Ch5 snapshot into a working taxi_pipeline on their local Astro.

Workshop targets:

Coaching prompts:

Support prompts for less technical backgrounds:

Gotchas walkthrough (10 min, just before assignment briefing)

Before Q&A, walk the class through the Gotchas & Pitfalls page at high speed. Focus on the ones students are most likely to hit on the assignment:

Remind students that Ch10 ends with a 10-line "audit your own DAG" exercise they should do before submitting.

Assignment alignment

Map class activities to assignment tasks explicitly: