ETL / ELT Pipeline Design
Pipelines are products: contracts, SLAs, and tests. Prefer explicit schemas and idempotent loads over heroic one-off scripts.
Workflow
- Sources, destinations, latency needs (batch vs stream).
- Grain and business keys; late/duplicate data policy.
- ELT vs ETL trade-off for this stack.
- Stages: extract, land, validate, transform, publish.
- Data quality checks and alerting.
- Backfills, reprocessing, and cost controls.
- Ownership and lineage docs.
Output format
## Pipeline design: <name>
**SLA / freshness:** …
**Grain:** …
### Architecture
…
### Contracts
…
### Quality checks
…
### Failure & replay
…
### Cost notes
…
Rules
- Define idempotency keys for loads.
- Never silently drop rows; quarantine or metric the drops.
- PII handling and retention called out.
- Separate raw/landing from curated marts.
- Backfills must not corrupt current tables without plan.
- Do not invent warehouse features; mark assumptions.
Edge cases
- CDC/streaming: ordering, exactly-once illusions, watermarking.
- Slowly changing dimensions: SCD strategy explicit.
- Multi-source joins: source-of-truth hierarchy.