Orchestration Concepts

Understand DAGs, schedules, logical dates, dependencies, retries, sensors, backfills, SLAs and alerting, independent of any one tool.

Intermediate · about 3 hours · difficulty 2/5

Learn first: ETL vs ELT and Load Patterns, Docker for Data Engineers

Cron can run a script at 2 a.m. It cannot tell you that step 3 failed, wait for an upstream file, retry with backoff, or rerun last month. An orchestrator does all of that.

Core ideas

  • DAG (directed acyclic graph): tasks and their dependencies. Extract before transform before test before publish.
  • Schedule: cron expressions or presets (daily, hourly). Know cron syntax.
  • Logical date or partition: each run processes a specific time window (the data for 23 October), not "whatever is new now". This is what makes reruns and backfills correct.
  • Retries with delay for transient failures; timeouts so stuck tasks fail.
  • Sensors and triggers: wait for a file, a table partition or another DAG.
  • Backfills: run the DAG for a range of past dates.
  • Concurrency limits so you do not overload a source database.

Operating pipelines

  • Alerting on failure to Slack, email or PagerDuty with a link to logs.
  • SLAs: the finance dashboard must be fresh by 9 a.m. IST; alert if it will be late.
  • Observability: run history, durations, which tasks are slow.

Task-centric vs asset-centric

Older tools think in tasks ("run this function"). Newer ones (Dagster, and Airflow's newer asset features) think in data assets ("this table should exist and be fresh"). Both describe the same pipelines from different angles.

Keep orchestrators thin

The orchestrator should trigger work (a dbt run, a Spark job, a container), not do heavy processing inside its own workers.

Pitfalls

  • Tasks that depend on wall-clock time instead of the logical date.
  • Giant tasks that do everything, so one failure means rerunning hours of work.

You are ready to move on when you can draw the DAG for a daily ingestion, dbt and quality-check pipeline, label retries, sensors and SLAs, and explain how you would backfill the last 30 days.

Key concepts

  • DAGs and dependencies
  • Cron schedules
  • Logical dates and partitions
  • Retries and timeouts
  • Sensors and event triggers
  • Backfills
  • Alerting and SLAs
  • Task-centric vs asset-centric

Mini project

Design (on paper or in a diagram tool) the DAG for a daily pipeline: extract from an API and Postgres, load to a lake, run dbt, run quality checks, refresh a dashboard. Specify retries, timeouts, sensors, SLA and alert channel for each task.

Check yourself

Why should a daily job process 'the logical date' rather than 'yesterday according to the server clock'?

Free resources