Purpose & When-To-Use
Trigger this skill when:
- Designing a new data pipeline (batch, streaming, or hybrid)
- Migrating from ETL to modern ELT patterns
- Implementing data quality checks in existing pipelines
- Troubleshooting data quality issues or pipeline failures
- Establishing data orchestration best practices
- Configuring real-time streaming data architectures
- Setting up data lineage and governance controls
Do NOT use for:
- Simple one-off data exports (use SQL directly)
- BI tool configuration (separate concern)
- ML model training pipelines (use mlops-lifecycle-manager skill)
- Database schema design only (use database-optimization-analyzer)
Pre-Checks
Time normalization:
- Compute
NOW_ET = 2025-10-25T21:30:36-04:00 (NIST/time.gov, America/New_York)
Input validation:
pipeline_type must be one of: batch, streaming, hybrid
source_systems must contain at least one valid source
transformation_requirements must specify business logic or be empty for raw ingestion
quality_requirements must define at least one validation rule or SLA
orchestration_platform must be specified (default: Airflow if omitted)
target_systems must contain at least one destination
Abort conditions:
- If source and target are identical (no transformation needed)
- If pipeline_type=streaming but no stream source specified
- If quality_requirements reference non-existent fields
- If orchestration_platform is unsupported (emit TODO list)
Procedure
Tier 1 (≤2k tokens): Quick Pipeline Design
Use when: 80% of cases; standard batch pipeline with known patterns
Steps:
Analyze inputs and classify pipeline pattern:
- Batch: scheduled ETL/ELT (daily, hourly)
- Streaming: real-time event processing (Kafka, Kinesis)
- Hybrid: batch + streaming (lambda architecture)
Select orchestration approach:
Generate pipeline architecture JSON:
{
"pipeline_id": "<slug>",
"type": "batch|streaming|hybrid",
"orchestration": "airflow|kafka",
"layers": {
"ingestion": {"sources": [], "method": "full|incremental"},
"transformation": {"tool": "dbt", "models": []},
"quality": {"framework": "great_expectations", "checkpoints": []},
"storage": {"targets": [], "format": "parquet|delta"}
},
"schedule": "cron|event-driven"
}
Output quick-start template:
- Airflow DAG skeleton with TaskGroups
- dbt project structure (staging → intermediate → marts)
- Great Expectations basic suite (nullity, uniqueness, ranges)
Define monitoring:
- SLA alerts (Airflow SLAs or custom)
- Data quality thresholds (fail fast on critical checks)
- Lineage tracking (dbt docs, OpenLineage)
Token budget: T1 ≤ 2000 tokens
Tier 2 (≤6k tokens): Production-Ready Pipeline with Quality Gates
Use when: Production deployment, complex transformations, strict SLAs
Prerequisites: T1 completed OR inputs indicate production requirements
Steps:
Deep-dive on data quality (accessed 2025-10-25T21:30:36-04:00: https://greatexpectations.io/):
- Profiling: auto-generate Expectations from sample data
- Critical validations: PK uniqueness, FK integrity, business rules
- Checkpoint strategy: pre-ingestion, post-transformation, pre-load
- Action on failure: block pipeline, alert, quarantine bad records
Optimize Airflow DAG design (accessed 2025-10-25T21:30:36-04:00: https://medium.com/@datasmiles/mastering-apache-airflow-myessential-best-practices-for-robust-data-orchestration-095460505843):
- Idempotent tasks: same input → same output (critical for backfills)
- Atomic tasks: one task = one action (fine-grained retry)
- Dynamic task generation: use TaskGroups for parallel sources
- XCom for state passing: avoid large payloads (use external state store)
- Connection management: use Airflow Connections, never hardcode credentials
- Resource optimization: pools, queues, executor type (LocalExecutor vs CeleryExecutor)
Implement dbt best practices (accessed 2025-10-25T21:30:36-04:00: https://www.getdbt.com/blog/data-transformation-best-practices):
- Layer pattern: staging (raw + minimal cleaning) → intermediate (business logic) → marts (denormalized for analytics)
- One model = one logical transformation (no mega-models with 50 joins)
- Materialization strategy:
- Views: lightweight, always fresh, slow queries
- Tables: fast queries, stale until rebuild
- Incremental: append-only or merge, handle late-arriving data
- Testing: not_null, unique, accepted_values, relationships
- Documentation: schema.yml with descriptions, dbt docs generate
- Macros for DRY: reusable SQL snippets (date ranges, common filters)
Configure streaming (if applicable):
- Kafka architecture: producers → topics (partitioned) → consumers (accessed 2025-10-25T21:30:36-04:00: https://kafka.apache.org/)
- Partition strategy: by key (user_id, order_id) for ordering guarantees
- Consumer groups: parallel processing, fault tolerance
- Schema registry: Avro/Protobuf for schema evolution (accessed 2025-10-25T21:30:36-04:00: https://www.confluent.io/blog/streaming-data-pipeline-with-apache-kafka-and-ksqldb/)
- ksqlDB for stream transformations: joins, aggregations, windowing
- Exactly-once semantics: idempotent producers + transactional consumers
Data lineage and governance:
- OpenLineage integration: capture lineage from Airflow and dbt
- Data catalog: tag PII, set retention policies
- RBAC: column-level access controls in warehouse
- Audit logs: who accessed what data, when
Monitoring and alerting:
- Pipeline health: Airflow UI, metrics to Prometheus/Datadog
- Data quality dashboards: Great Expectations Data Docs
- SLA violations: PagerDuty/Slack integration
- Cost tracking: warehouse query costs, Airflow compute
Token budget: T2 ≤ 6000 tokens
Tier 3 (≤12k tokens): Advanced Patterns and Optimization
Use when: Handling PB-scale data, multi-region, complex event-driven patterns
Note: This skill is scoped to T2. For T3 scenarios:
- TODO: Consult mlops-lifecycle-manager for ML feature pipelines
- TODO: Consult database-optimization-analyzer for warehouse tuning
- TODO: Consult cloud-native-deployment-orchestrator for Kubernetes-based orchestration
Not implemented in v1.0.0.
Decision Rules
When to choose batch vs streaming:
- Batch if: data arrives in bulk, latency tolerance >1 hour, simpler to maintain
- Streaming if: sub-second latency required, event-driven triggers, real-time analytics
- Hybrid if: both real-time dashboards AND overnight batch reporting needed
When to use incremental vs full refresh:
- Full refresh: small tables (<10M rows), idempotent, no history tracking
- Incremental: large tables (>100M rows), append-only or merge strategy, track watermarks
When to fail vs warn on data quality issues:
- Fail (block pipeline): critical business rules (revenue calculations, PK violations)
- Warn (continue with alert): non-critical outliers, minor formatting issues
- Quarantine: isolate bad records, process good records, manual review queue
Orchestration platform selection:
- Airflow: if need Python flexibility, complex dependencies, mature ecosystem
- Prefect: if want modern UI, easier local development, Pythonic
- Dagster: if want software-defined assets, testing-first approach
- Cloud-native (Step Functions, Cloud Composer): if locked into cloud vendor
Abort conditions:
- No clear transformation logic defined → emit TODO: "Specify business rules"
- Source schema unknown → emit TODO: "Profile source data first"
- Target warehouse not provisioned → emit TODO: "Setup destination infra"
Output Contract
Required fields:
{
"pipeline_architecture": {
"pipeline_id": "string (slug format)",
"type": "batch|streaming|hybrid",
"orchestration": {
"platform": "airflow|prefect|dagster|kafka",
"schedule": "cron expression | event-driven",
"parallelism": "integer (max concurrent tasks)"
},
"layers": {
"ingestion": {
"sources": ["array of source configs"],
"method": "full|incremental",
"connector": "native|fivetran|airbyte|custom"
},
"transformation": {
"tool": "dbt|spark|custom",
"models": ["array of model names"],
"materialization": "view|table|incremental"
},
"quality": {
"framework": "great_expectations|dbt_tests|custom",
"checkpoints": ["array of checkpoint configs"],
"action_on_failure": "block|warn|quarantine"
},
"storage": {
"targets": ["array of target configs"],
"format": "parquet|delta|iceberg|avro"
}
},
"monitoring": {
"slas": ["array of SLA definitions"],
"alerts": ["array of alert configs"],
"lineage": "openlineage|datahub|custom"
}
},
"dag_template": "string (executable code or path to resource)",
"quality_checks": "string (Great Expectations suite YAML or dbt test SQL)",
"monitoring_config": "string (alert rules, dashboard JSON)",
"implementation_guide": "array of step-by-step instructions"
}
Optional fields:
cost_estimate: projected monthly cost (warehouse + orchestration + storage)
performance_benchmarks: expected throughput, latency targets
rollback_plan: how to revert if pipeline fails in production
Validation:
pipeline_id must be unique, slug format (lowercase, hyphens)
schedule must be valid cron OR event trigger definition
sources and targets must have valid connection info (no credentials in output)
- All referenced
models must exist in transformation layer
Examples
Example 1: Batch ELT Pipeline (E-commerce Orders)
# Input
pipeline_type: batch
source_systems: [{type: postgres, name: orders_db, tables: [orders, customers]}]
transformation_requirements: [Join orders+customers, Calculate daily revenue]
quality_requirements: [order_id unique, order_total > 0]
orchestration_platform: airflow
target_systems: [{type: snowflake, schema: analytics}]
schedule: 0 2 * * *
# Output (abbreviated)
pipeline_architecture:
pipeline_id: ecommerce-orders-elt
type: batch
orchestration: {platform: airflow, schedule: "0 2 * * *"}
layers:
ingestion:
sources: [orders_db.orders, orders_db.customers]
method: incremental
transformation:
tool: dbt
models: [stg_orders, int_order_metrics, fct_daily_revenue]
quality:
framework: great_expectations
checkpoints: [staging_check, marts_check]
Quality Gates
Token budgets (enforced):
- T1: ≤2000 tokens (quick design, standard patterns)
- T2: ≤6000 tokens (production-ready, quality gates, monitoring)
- T3: Not implemented in v1.0.0
Safety checks:
- Never emit credentials or API keys in outputs
- Always use environment variables or secret managers (Airflow Connections, AWS Secrets Manager)
- Validate that quality checks don't reference PII columns without encryption
Auditability:
- All architecture decisions logged in
implementation_guide
- Source links with access dates for claims (Airflow docs, dbt docs, etc.)
- Version transformations with dbt git tags or Airflow DAG versions
Determinism:
- Same inputs → same pipeline architecture JSON
- Idempotent DAG designs (safe to re-run)
- Incremental models handle late-arriving data gracefully
Resources
Official documentation (accessed 2025-10-25T21:30:36-04:00):
Best practices guides:
Templates and examples:
- Located in
/skills/data-pipeline-designer/resources/
airflow-dag-template.py: Production-ready DAG with TaskGroups and SLAs
dbt-project-structure.yml: Layered dbt project (staging → marts)
great-expectations-suite.yml: Common data quality checks
kafka-streaming-config.json: Schema registry + consumer group setup
Related skills:
database-optimization-analyzer: For warehouse query tuning and indexing
devops-pipeline-architect: For CI/CD of pipeline code
cloud-native-deployment-orchestrator: For Kubernetes-based Airflow deployments
1---2name: data-engineering-pipeline-designer3description: Design data pipelines with quality checks, orchestration, and governance using modern data stack patterns for robust ELT/ETL workflows.4license: MIT5---67## Purpose & When-To-Use89**Trigger this skill when:**1011- Designing a new data pipeline (batch, streaming, or hybrid)12- Migrating from ETL to modern ELT patterns13- Implementing data quality checks in existing pipelines14- Troubleshooting data quality issues or pipeline failures15- Establishing data orchestration best practices16- Configuring real-time streaming data architectures17- Setting up data lineage and governance controls1819**Do NOT use for:**2021- Simple one-off data exports (use SQL directly)22- BI tool configuration (separate concern)23- ML model training pipelines (use mlops-lifecycle-manager skill)24- Database schema design only (use database-optimization-analyzer)2526## Pre-Checks2728**Time normalization:**2930- Compute `NOW_ET` = 2025-10-25T21:30:36-04:00 (NIST/time.gov, America/New_York)3132**Input validation:**33341. `pipeline_type` must be one of: batch, streaming, hybrid352. `source_systems` must contain at least one valid source363. `transformation_requirements` must specify business logic or be empty for raw ingestion374. `quality_requirements` must define at least one validation rule or SLA385. `orchestration_platform` must be specified (default: Airflow if omitted)396. `target_systems` must contain at least one destination4041**Abort conditions:**4243- If source and target are identical (no transformation needed)44- If pipeline_type=streaming but no stream source specified45- If quality_requirements reference non-existent fields46- If orchestration_platform is unsupported (emit TODO list)4748## Procedure4950### Tier 1 (≤2k tokens): Quick Pipeline Design5152**Use when:** 80% of cases; standard batch pipeline with known patterns5354**Steps:**55561. **Analyze inputs** and classify pipeline pattern:57 - Batch: scheduled ETL/ELT (daily, hourly)58 - Streaming: real-time event processing (Kafka, Kinesis)59 - Hybrid: batch + streaming (lambda architecture)60612. **Select orchestration approach:**62 - Airflow DAG for batch/hybrid (de facto standard, accessed 2025-10-25T21:30:36-04:00: https://www.astronomer.io/airflow/)63 - Kafka + ksqlDB for streaming (accessed 2025-10-25T21:30:36-04:00: https://kafka.apache.org/documentation/)64 - dbt for transformation layer (accessed 2025-10-25T21:30:36-04:00: https://docs.getdbt.com/)65663. **Generate pipeline architecture JSON:**67 ```json68 {69 "pipeline_id": "<slug>",70 "type": "batch|streaming|hybrid",71 "orchestration": "airflow|kafka",72 "layers": {73 "ingestion": {"sources": [], "method": "full|incremental"},74 "transformation": {"tool": "dbt", "models": []},75 "quality": {"framework": "great_expectations", "checkpoints": []},76 "storage": {"targets": [], "format": "parquet|delta"}77 },78 "schedule": "cron|event-driven"79 }80 ```81824. **Output quick-start template:**83 - Airflow DAG skeleton with TaskGroups84 - dbt project structure (staging → intermediate → marts)85 - Great Expectations basic suite (nullity, uniqueness, ranges)86875. **Define monitoring:**88 - SLA alerts (Airflow SLAs or custom)89 - Data quality thresholds (fail fast on critical checks)90 - Lineage tracking (dbt docs, OpenLineage)9192**Token budget: T1 ≤ 2000 tokens**9394### Tier 2 (≤6k tokens): Production-Ready Pipeline with Quality Gates9596**Use when:** Production deployment, complex transformations, strict SLAs9798**Prerequisites:** T1 completed OR inputs indicate production requirements99100**Steps:**1011021. **Deep-dive on data quality** (accessed 2025-10-25T21:30:36-04:00: https://greatexpectations.io/):103 - Profiling: auto-generate Expectations from sample data104 - Critical validations: PK uniqueness, FK integrity, business rules105 - Checkpoint strategy: pre-ingestion, post-transformation, pre-load106 - Action on failure: block pipeline, alert, quarantine bad records1071082. **Optimize Airflow DAG design** (accessed 2025-10-25T21:30:36-04:00: https://medium.com/@datasmiles/mastering-apache-airflow-myessential-best-practices-for-robust-data-orchestration-095460505843):109 - Idempotent tasks: same input → same output (critical for backfills)110 - Atomic tasks: one task = one action (fine-grained retry)111 - Dynamic task generation: use TaskGroups for parallel sources112 - XCom for state passing: avoid large payloads (use external state store)113 - Connection management: use Airflow Connections, never hardcode credentials114 - Resource optimization: pools, queues, executor type (LocalExecutor vs CeleryExecutor)1151163. **Implement dbt best practices** (accessed 2025-10-25T21:30:36-04:00: https://www.getdbt.com/blog/data-transformation-best-practices):117 - Layer pattern: staging (raw + minimal cleaning) → intermediate (business logic) → marts (denormalized for analytics)118 - One model = one logical transformation (no mega-models with 50 joins)119 - Materialization strategy:120 - Views: lightweight, always fresh, slow queries121 - Tables: fast queries, stale until rebuild122 - Incremental: append-only or merge, handle late-arriving data123 - Testing: not_null, unique, accepted_values, relationships124 - Documentation: schema.yml with descriptions, dbt docs generate125 - Macros for DRY: reusable SQL snippets (date ranges, common filters)1261274. **Configure streaming (if applicable):**128 - Kafka architecture: producers → topics (partitioned) → consumers (accessed 2025-10-25T21:30:36-04:00: https://kafka.apache.org/)129 - Partition strategy: by key (user_id, order_id) for ordering guarantees130 - Consumer groups: parallel processing, fault tolerance131 - Schema registry: Avro/Protobuf for schema evolution (accessed 2025-10-25T21:30:36-04:00: https://www.confluent.io/blog/streaming-data-pipeline-with-apache-kafka-and-ksqldb/)132 - ksqlDB for stream transformations: joins, aggregations, windowing133 - Exactly-once semantics: idempotent producers + transactional consumers1341355. **Data lineage and governance:**136 - OpenLineage integration: capture lineage from Airflow and dbt137 - Data catalog: tag PII, set retention policies138 - RBAC: column-level access controls in warehouse139 - Audit logs: who accessed what data, when1401416. **Monitoring and alerting:**142 - Pipeline health: Airflow UI, metrics to Prometheus/Datadog143 - Data quality dashboards: Great Expectations Data Docs144 - SLA violations: PagerDuty/Slack integration145 - Cost tracking: warehouse query costs, Airflow compute146147**Token budget: T2 ≤ 6000 tokens**148149### Tier 3 (≤12k tokens): Advanced Patterns and Optimization150151**Use when:** Handling PB-scale data, multi-region, complex event-driven patterns152153**Note:** This skill is scoped to T2. For T3 scenarios:154155- **TODO:** Consult mlops-lifecycle-manager for ML feature pipelines156- **TODO:** Consult database-optimization-analyzer for warehouse tuning157- **TODO:** Consult cloud-native-deployment-orchestrator for Kubernetes-based orchestration158159**Not implemented in v1.0.0.**160161## Decision Rules162163**When to choose batch vs streaming:**164165- Batch if: data arrives in bulk, latency tolerance >1 hour, simpler to maintain166- Streaming if: sub-second latency required, event-driven triggers, real-time analytics167- Hybrid if: both real-time dashboards AND overnight batch reporting needed168169**When to use incremental vs full refresh:**170171- Full refresh: small tables (<10M rows), idempotent, no history tracking172- Incremental: large tables (>100M rows), append-only or merge strategy, track watermarks173174**When to fail vs warn on data quality issues:**175176- Fail (block pipeline): critical business rules (revenue calculations, PK violations)177- Warn (continue with alert): non-critical outliers, minor formatting issues178- Quarantine: isolate bad records, process good records, manual review queue179180**Orchestration platform selection:**181182- Airflow: if need Python flexibility, complex dependencies, mature ecosystem183- Prefect: if want modern UI, easier local development, Pythonic184- Dagster: if want software-defined assets, testing-first approach185- Cloud-native (Step Functions, Cloud Composer): if locked into cloud vendor186187**Abort conditions:**188189- No clear transformation logic defined → emit TODO: "Specify business rules"190- Source schema unknown → emit TODO: "Profile source data first"191- Target warehouse not provisioned → emit TODO: "Setup destination infra"192193## Output Contract194195**Required fields:**196197```json198{199 "pipeline_architecture": {200 "pipeline_id": "string (slug format)",201 "type": "batch|streaming|hybrid",202 "orchestration": {203 "platform": "airflow|prefect|dagster|kafka",204 "schedule": "cron expression | event-driven",205 "parallelism": "integer (max concurrent tasks)"206 },207 "layers": {208 "ingestion": {209 "sources": ["array of source configs"],210 "method": "full|incremental",211 "connector": "native|fivetran|airbyte|custom"212 },213 "transformation": {214 "tool": "dbt|spark|custom",215 "models": ["array of model names"],216 "materialization": "view|table|incremental"217 },218 "quality": {219 "framework": "great_expectations|dbt_tests|custom",220 "checkpoints": ["array of checkpoint configs"],221 "action_on_failure": "block|warn|quarantine"222 },223 "storage": {224 "targets": ["array of target configs"],225 "format": "parquet|delta|iceberg|avro"226 }227 },228 "monitoring": {229 "slas": ["array of SLA definitions"],230 "alerts": ["array of alert configs"],231 "lineage": "openlineage|datahub|custom"232 }233 },234 "dag_template": "string (executable code or path to resource)",235 "quality_checks": "string (Great Expectations suite YAML or dbt test SQL)",236 "monitoring_config": "string (alert rules, dashboard JSON)",237 "implementation_guide": "array of step-by-step instructions"238}239```240241**Optional fields:**242243- `cost_estimate`: projected monthly cost (warehouse + orchestration + storage)244- `performance_benchmarks`: expected throughput, latency targets245- `rollback_plan`: how to revert if pipeline fails in production246247**Validation:**248249- `pipeline_id` must be unique, slug format (lowercase, hyphens)250- `schedule` must be valid cron OR event trigger definition251- `sources` and `targets` must have valid connection info (no credentials in output)252- All referenced `models` must exist in transformation layer253254## Examples255256**Example 1: Batch ELT Pipeline (E-commerce Orders)**257258```yaml259# Input260pipeline_type: batch261source_systems: [{type: postgres, name: orders_db, tables: [orders, customers]}]262transformation_requirements: [Join orders+customers, Calculate daily revenue]263quality_requirements: [order_id unique, order_total > 0]264orchestration_platform: airflow265target_systems: [{type: snowflake, schema: analytics}]266schedule: 0 2 * * *267268# Output (abbreviated)269pipeline_architecture:270 pipeline_id: ecommerce-orders-elt271 type: batch272 orchestration: {platform: airflow, schedule: "0 2 * * *"}273 layers:274 ingestion:275 sources: [orders_db.orders, orders_db.customers]276 method: incremental277 transformation:278 tool: dbt279 models: [stg_orders, int_order_metrics, fct_daily_revenue]280 quality:281 framework: great_expectations282 checkpoints: [staging_check, marts_check]283```284285## Quality Gates286287**Token budgets (enforced):**288289- T1: ≤2000 tokens (quick design, standard patterns)290- T2: ≤6000 tokens (production-ready, quality gates, monitoring)291- T3: Not implemented in v1.0.0292293**Safety checks:**294295- Never emit credentials or API keys in outputs296- Always use environment variables or secret managers (Airflow Connections, AWS Secrets Manager)297- Validate that quality checks don't reference PII columns without encryption298299**Auditability:**300301- All architecture decisions logged in `implementation_guide`302- Source links with access dates for claims (Airflow docs, dbt docs, etc.)303- Version transformations with dbt git tags or Airflow DAG versions304305**Determinism:**306307- Same inputs → same pipeline architecture JSON308- Idempotent DAG designs (safe to re-run)309- Incremental models handle late-arriving data gracefully310311## Resources312313**Official documentation (accessed 2025-10-25T21:30:36-04:00):**314315- Apache Airflow: https://airflow.apache.org/docs/316- dbt (data build tool): https://docs.getdbt.com/317- Great Expectations: https://greatexpectations.io/318- Apache Kafka: https://kafka.apache.org/documentation/319320**Best practices guides:**321322- Airflow orchestration patterns: https://www.astronomer.io/airflow/323- dbt transformation best practices: https://www.getdbt.com/blog/data-transformation-best-practices324- Modern data stack architecture: https://www.getdbt.com/blog/data-integration325326**Templates and examples:**327328- Located in `/skills/data-pipeline-designer/resources/`329- `airflow-dag-template.py`: Production-ready DAG with TaskGroups and SLAs330- `dbt-project-structure.yml`: Layered dbt project (staging → marts)331- `great-expectations-suite.yml`: Common data quality checks332- `kafka-streaming-config.json`: Schema registry + consumer group setup333334**Related skills:**335336- `database-optimization-analyzer`: For warehouse query tuning and indexing337- `devops-pipeline-architect`: For CI/CD of pipeline code338- `cloud-native-deployment-orchestrator`: For Kubernetes-based Airflow deployments