Orchestration and DAGs
Airflow (Cloud Composer) · 11 questions
Short notes
Key idea
Orchestration runs the steps of a pipeline in the right order, on a schedule, with retries and alerts. In Airflow a pipeline is a DAG: a directed acyclic graph of tasks, written in Python.
Syntax
- DAG: the whole workflow, with a schedule and start date.
- Task: one step (run SQL, call an API, copy a file), made from an operator.
- Dependencies: arrows between tasks; no cycles allowed.
- Scheduler decides what should run; workers run tasks; the web UI shows runs, logs and retries.
- DAG run: one execution for one data interval (e.g. one day).
Example
Daily sales pipeline: extract_orders → load_to_bigquery → build_marts → run_tests → notify. If the load fails, Airflow retries it twice, then marks the run failed and alerts; the later tasks don't run on bad data.
Traps
- Airflow orchestrates; it shouldn't process big data itself. Push heavy work to BigQuery, Spark or Dataflow.
- Cron jobs on a laptop have no retries, history or dependency handling; that's the problem Airflow solves.
- A cycle (A → B → A) isn't allowed; the DAG won't load.
- Top-level code in a DAG file runs on every parse; keep it light.
Want the full lesson with step-by-step examples, a project and a certificate? Airflow (Cloud Composer) course, ₹120 →
Questions
5 free questions- Question 1easy
What does "acyclic" mean in Directed Acyclic Graph?
- Question 2easy
What is Cloud Composer?
- Question 3medium
A task needs to aggregate 500 GB of orders. What should the Airflow task do?
- Question 4medium
Why split a pipeline into several small tasks instead of one big script?
- Question 5easy
Which of these does an orchestrator like Airflow add over a set of cron jobs?
Orchestration and DAGs
Orchestration and DAGs
Orchestration and DAGs
Orchestration and DAGs
Orchestration and DAGs
6 more questions on this topic, with hints, and tests
Sign up free for 21 days of every question and test.