Pipeline Design
Purpose
Design data pipelines that reliably move, transform, and deliver data from source systems to consumption layers. Covers ETL vs ELT pattern selection, orchestration tool choice, batch vs streaming trade-offs, idempotency guarantees, data quality checkpoints, and lineage tracking.
Scope Constraints
Reads pipeline configurations, DAG definitions, orchestration manifests, and infrastructure specs for analysis. Does not execute pipelines, deploy infrastructure, or modify production configurations.
Inputs
- Source systems and their data formats (databases, APIs, event streams, files)
- Destination systems (warehouse, lake, feature store, BI tool)
- Data volume and velocity (rows/day, events/second, payload size)
- Freshness requirements (real-time, near-real-time, hourly, daily)
- Existing infrastructure (cloud provider, orchestration tools, current pipelines)
- Team size and expertise (SQL-heavy? Python-heavy? Platform team available?)
Input Sanitization
No user-provided values are used in commands or file paths. All inputs are treated as read-only analysis targets.
Procedure
Progress Checklist
Step 1: Map Source-to-Destination Flows
Document every data flow:
- Source system, extraction method (CDC, API poll, event subscription, file drop)
- Transformation requirements (cleaning, joining, aggregating, enriching)
- Destination system and loading pattern (append, upsert, full refresh)
- Data volume per flow (rows/batch, events/second)
Produce a flow diagram showing all sources, transformations, and destinations.
Step 2: Choose ETL vs ELT Pattern
Evaluate the trade-offs:
- ETL (Extract-Transform-Load): Transform before loading. Best when: destination has limited compute, transformations reduce data volume significantly, or sensitive data must be filtered before landing.
- ELT (Extract-Load-Transform): Load raw first, transform in-warehouse. Best when: destination has powerful compute (BigQuery, Snowflake, Databricks), you want raw data preserved for auditability, or transformation logic changes frequently.
Document the chosen pattern per flow and the reasoning.
Step 3: Select Batch vs Streaming
For each flow, determine the processing mode:
- Batch: Scheduled intervals (hourly, daily). Simple, cost-effective, good tooling. Best when freshness SLA is minutes-to-hours.
- Micro-batch: Frequent small batches (every 1-5 minutes). Compromise between batch simplicity and near-real-time freshness.
- Streaming: Continuous processing (Kafka, Kinesis, Flink). Best when freshness SLA is seconds and data arrives as an event stream.
Document latency requirements, cost implications, and complexity trade-offs for the chosen mode.
Step 4: Design for Idempotency
Ensure every pipeline step is safe to re-run:
- Use merge/upsert patterns instead of blind inserts
- Partition data by time to enable clean backfills without full re-processing
- Use deterministic IDs (content-based hashing) or natural keys for deduplication
- Document the idempotency strategy for each pipeline step: "If this step runs twice for the same input, what happens?"
Step 5: Define Data Quality Checkpoints
Insert quality gates between pipeline stages:
- Source validation: Schema conformance, null rates, row count thresholds
- Transformation validation: Referential integrity, business rule assertions, duplicate detection
- Destination validation: Row count reconciliation (source vs destination), freshness checks, metric drift alerts
For each checkpoint, define: what is checked, what threshold triggers a failure, and what happens on failure (halt pipeline, alert, quarantine bad records).
Step 6: Plan Lineage and Observability
Design data lineage tracking:
- Column-level lineage from source to destination
- Transformation dependency graph (which tables feed which downstream models)
- Pipeline execution metadata (start time, end time, rows processed, errors)
- Alerting on SLA breaches, data quality failures, and pipeline errors
Specify tooling: dbt lineage, OpenLineage, Datahub, or custom metadata tables.
Step 7: Select Orchestration Tool
Choose the orchestration layer based on team and requirements:
- dbt — SQL-centric transformations, built-in lineage, great for ELT. Best for analytics engineering teams.
- Airflow — General-purpose DAG orchestration, large ecosystem, battle-tested. Best for complex multi-system pipelines.
- Dagster — Software-defined assets, strong typing, built-in observability. Best for teams wanting modern DX and asset-centric thinking.
- Prefect — Python-native, dynamic workflows, lightweight. Best for Python-heavy teams with simpler orchestration needs.
Document the choice, alternatives considered, and migration path if the team outgrows the tool.
Compaction resilience: If context was lost during a long session, re-read the Inputs section to reconstruct what system is being analyzed, check the Progress Checklist for completed steps, then resume from the earliest incomplete step.
Handoff
- Hand off to schema-evaluation if the pipeline design reveals data modeling or warehouse schema concerns.
- Hand off to warden/incident-analysis if pipeline failures indicate systemic reliability or incident response needs.
Output Format
# Pipeline Design: [Project/Domain Name]
## Flow Diagram
[ASCII diagram showing sources → transformations → destinations]
## Flow Inventory
| Flow | Source | Extraction | Transform | Load Pattern | Volume | Freshness SLA |
|------|--------|-----------|-----------|-------------|--------|---------------|
| ... | ... | ... | ... | ... | ... | ... |
## Architecture Decisions
| Decision | Chosen | Alternatives | Rationale |
|----------|--------|-------------|-----------|
| ETL vs ELT | ... | ... | ... |
| Batch vs Streaming | ... | ... | ... |
| Orchestration tool | ... | ... | ... |
## Idempotency Strategy
| Pipeline Step | Idempotency Method | Re-run Behavior |
|---------------|-------------------|-----------------|
| ... | ... | ... |
## Data Quality Checkpoints
| Stage | Check | Threshold | On Failure |
|-------|-------|-----------|------------|
| Source | ... | ... | ... |
| Transform | ... | ... | ... |
| Destination | ... | ... | ... |
## Lineage and Observability
| Capability | Tool/Method | Coverage |
|-----------|-------------|----------|
| Column lineage | ... | ... |
| Pipeline metrics | ... | ... |
| Alerting | ... | ... |
## Orchestration Design
| DAG/Pipeline | Schedule | Dependencies | SLA |
|-------------|----------|-------------|-----|
| ... | ... | ... | ... |
Quality Checks
Evolution Notes
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: pipeline-design3description: Use when designing data pipelines for moving, transforming, and delivering data. Covers ETL vs ELT pattern selection, orchestration tool choice, batch vs streaming trade-offs, idempotency guarantees, data quality checkpoints, and lineage tracking. Do not use for schema modeling (use schema-evaluation) or ML workflows (use ml-workflow).4---56# Pipeline Design78## Purpose910Design data pipelines that reliably move, transform, and deliver data from source systems to consumption layers. Covers ETL vs ELT pattern selection, orchestration tool choice, batch vs streaming trade-offs, idempotency guarantees, data quality checkpoints, and lineage tracking.1112## Scope Constraints1314Reads pipeline configurations, DAG definitions, orchestration manifests, and infrastructure specs for analysis. Does not execute pipelines, deploy infrastructure, or modify production configurations.1516## Inputs1718- Source systems and their data formats (databases, APIs, event streams, files)19- Destination systems (warehouse, lake, feature store, BI tool)20- Data volume and velocity (rows/day, events/second, payload size)21- Freshness requirements (real-time, near-real-time, hourly, daily)22- Existing infrastructure (cloud provider, orchestration tools, current pipelines)23- Team size and expertise (SQL-heavy? Python-heavy? Platform team available?)2425## Input Sanitization2627No user-provided values are used in commands or file paths. All inputs are treated as read-only analysis targets.2829## Procedure3031### Progress Checklist32- [ ] Step 1: Map source-to-destination flows33- [ ] Step 2: Choose ETL vs ELT pattern34- [ ] Step 3: Select batch vs streaming35- [ ] Step 4: Design for idempotency36- [ ] Step 5: Define data quality checkpoints37- [ ] Step 6: Plan lineage and observability38- [ ] Step 7: Select orchestration tool3940### Step 1: Map Source-to-Destination Flows4142Document every data flow:43- Source system, extraction method (CDC, API poll, event subscription, file drop)44- Transformation requirements (cleaning, joining, aggregating, enriching)45- Destination system and loading pattern (append, upsert, full refresh)46- Data volume per flow (rows/batch, events/second)4748Produce a flow diagram showing all sources, transformations, and destinations.4950### Step 2: Choose ETL vs ELT Pattern5152Evaluate the trade-offs:53- **ETL (Extract-Transform-Load):** Transform before loading. Best when: destination has limited compute, transformations reduce data volume significantly, or sensitive data must be filtered before landing.54- **ELT (Extract-Load-Transform):** Load raw first, transform in-warehouse. Best when: destination has powerful compute (BigQuery, Snowflake, Databricks), you want raw data preserved for auditability, or transformation logic changes frequently.5556Document the chosen pattern per flow and the reasoning.5758### Step 3: Select Batch vs Streaming5960For each flow, determine the processing mode:61- **Batch:** Scheduled intervals (hourly, daily). Simple, cost-effective, good tooling. Best when freshness SLA is minutes-to-hours.62- **Micro-batch:** Frequent small batches (every 1-5 minutes). Compromise between batch simplicity and near-real-time freshness.63- **Streaming:** Continuous processing (Kafka, Kinesis, Flink). Best when freshness SLA is seconds and data arrives as an event stream.6465Document latency requirements, cost implications, and complexity trade-offs for the chosen mode.6667### Step 4: Design for Idempotency6869Ensure every pipeline step is safe to re-run:70- Use merge/upsert patterns instead of blind inserts71- Partition data by time to enable clean backfills without full re-processing72- Use deterministic IDs (content-based hashing) or natural keys for deduplication73- Document the idempotency strategy for each pipeline step: "If this step runs twice for the same input, what happens?"7475### Step 5: Define Data Quality Checkpoints7677Insert quality gates between pipeline stages:78- **Source validation:** Schema conformance, null rates, row count thresholds79- **Transformation validation:** Referential integrity, business rule assertions, duplicate detection80- **Destination validation:** Row count reconciliation (source vs destination), freshness checks, metric drift alerts8182For each checkpoint, define: what is checked, what threshold triggers a failure, and what happens on failure (halt pipeline, alert, quarantine bad records).8384### Step 6: Plan Lineage and Observability8586Design data lineage tracking:87- Column-level lineage from source to destination88- Transformation dependency graph (which tables feed which downstream models)89- Pipeline execution metadata (start time, end time, rows processed, errors)90- Alerting on SLA breaches, data quality failures, and pipeline errors9192Specify tooling: dbt lineage, OpenLineage, Datahub, or custom metadata tables.9394### Step 7: Select Orchestration Tool9596Choose the orchestration layer based on team and requirements:97- **dbt** — SQL-centric transformations, built-in lineage, great for ELT. Best for analytics engineering teams.98- **Airflow** — General-purpose DAG orchestration, large ecosystem, battle-tested. Best for complex multi-system pipelines.99- **Dagster** — Software-defined assets, strong typing, built-in observability. Best for teams wanting modern DX and asset-centric thinking.100- **Prefect** — Python-native, dynamic workflows, lightweight. Best for Python-heavy teams with simpler orchestration needs.101102Document the choice, alternatives considered, and migration path if the team outgrows the tool.103104> **Compaction resilience**: If context was lost during a long session, re-read the Inputs section to reconstruct what system is being analyzed, check the Progress Checklist for completed steps, then resume from the earliest incomplete step.105106## Handoff107108- Hand off to schema-evaluation if the pipeline design reveals data modeling or warehouse schema concerns.109- Hand off to warden/incident-analysis if pipeline failures indicate systemic reliability or incident response needs.110111## Output Format112113```markdown114# Pipeline Design: [Project/Domain Name]115116## Flow Diagram117118```119[ASCII diagram showing sources → transformations → destinations]120```121122## Flow Inventory123124| Flow | Source | Extraction | Transform | Load Pattern | Volume | Freshness SLA |125|------|--------|-----------|-----------|-------------|--------|---------------|126| ... | ... | ... | ... | ... | ... | ... |127128## Architecture Decisions129130| Decision | Chosen | Alternatives | Rationale |131|----------|--------|-------------|-----------|132| ETL vs ELT | ... | ... | ... |133| Batch vs Streaming | ... | ... | ... |134| Orchestration tool | ... | ... | ... |135136## Idempotency Strategy137138| Pipeline Step | Idempotency Method | Re-run Behavior |139|---------------|-------------------|-----------------|140| ... | ... | ... |141142## Data Quality Checkpoints143144| Stage | Check | Threshold | On Failure |145|-------|-------|-----------|------------|146| Source | ... | ... | ... |147| Transform | ... | ... | ... |148| Destination | ... | ... | ... |149150## Lineage and Observability151152| Capability | Tool/Method | Coverage |153|-----------|-------------|----------|154| Column lineage | ... | ... |155| Pipeline metrics | ... | ... |156| Alerting | ... | ... |157158## Orchestration Design159160| DAG/Pipeline | Schedule | Dependencies | SLA |161|-------------|----------|-------------|-----|162| ... | ... | ... | ... |163```164165## Quality Checks166167- [ ] Every source-to-destination flow is documented with volume and freshness SLA168- [ ] ETL vs ELT decision is justified per flow, not assumed globally169- [ ] Batch vs streaming choice is driven by freshness requirements, not preference170- [ ] Every pipeline step has an idempotency strategy documented171- [ ] Data quality checkpoints exist between each pipeline stage172- [ ] Failure handling is specified for each checkpoint (halt, alert, quarantine)173- [ ] Lineage tracking covers column-level provenance for critical fields174- [ ] Orchestration tool selection considers team expertise and existing infrastructure175- [ ] Backfill strategy is documented — how to reprocess historical data safely176177## Evolution Notes178<!-- Observations appended after each use -->179180---181> Converted and distributed by [TomeVault](https://tomevault.io/claim/dtsong) — claim your Tome and manage your conversions.182<!-- tomevault:4.0:skill_md:2026-04-13 -->