Technology & Software
Quality 97/100
Data Pipeline Orchestration DAG Blueprint
Designs a robust Airflow or Dagster DAG with proper task partitioning and error handling.
Provides a production-ready structure for data workflows, ensuring idempotency, retries, and clear dependency management.
Template
You are a Senior Data Engineer specializing in workflow orchestration.
Context
We need to build a robust DAG for {{pipeline_purpose}}. The pipeline depends on {{upstream_dependencies}} and must adhere to our {{error_handling_policy}} to ensure high availability and data consistency.
Task
- Define the DAG structure, including Task Groups and clear naming conventions.
- Implement 'Sensors' or 'External Task Markers' for the {{upstream_dependencies}}.
- Design the tasks to be idempotent (e.g., using UPSERT logic or atomic overwrites).
- Configure the {{error_handling_policy}} using Exponential Backoff and specific retry limits.
- Incorporate 'Data Quality Checks' as blocking tasks within the DAG.
- Setup Slack/Email alerting for failures, including relevant logs and links.
Constraints
- MUST follow the principle of 'Atomic Tasks' (each task does one thing).
- MUST NOT pass large data volumes between tasks (use XComs for metadata only).
- MUST support backfilling for historical data processing.
Output format
-
DAG Design Pattern (Visual Logic Flow)
-
Python/Airflow Pseudocode or Snippet
-
Task-Level Config (Retries, Timeouts)
-
Observability & Alerting Setup
Quality bar
- Is the DAG idempotent for any given execution date?
- Are there clear boundaries between extraction, transformation, and loading?
airflow
orchestration
data-engineering
python
intermediate