© 2026 Stephen Adei. All rights reserved. All content on this site is the intellectual property of Stephen Adei. See License for terms of use and attribution.
ADR-006: run_id Isolation Pattern
Status
Accepted
Context
The system needs to support safe backfills, parallel runs, and idempotent reruns without data loss or corruption.
The following options were considered:
- run_id isolation (chosen)
- Overwrite pattern (rejected)
- Versioned tables (rejected - adds complexity)
Decision
Use run_id isolation pattern where each ETL run writes to a unique S3 path determined by run_id (e.g., run_id=20260121T120000Z/). Promotion occurs by updating _LATEST.json pointer, not by overwriting data.
Rationale
- Safe backfills: Reprocess historical data without overwriting existing runs
- Idempotent reruns: Failed runs can be safely rerun without data loss
- Parallel runs: Multiple runs can execute concurrently without conflicts
- Audit trail: All runs preserved for compliance and debugging
- Rollback safety: Can revert to previous run by updating
_LATEST.json
Consequences
Positive:
- Safe backfills: No overwrites, complete audit trail
- Idempotent reruns: Failed runs can be safely rerun
- Parallel execution: Multiple runs do not conflict
- Audit compliance: All runs preserved for audit
- Rollback capability: Easy reversion to previous runs
Negative:
- Storage cost: Multiple versions per partition retained
- Manual cleanup: Old runs must be manually archived/deleted
Alternatives Considered
Overwrite Pattern
- Why rejected: Data loss risk on failures, no audit trail, unsafe backfills.
Versioned Tables (Iceberg/Delta)
- Why rejected: Adds complexity, not needed for batch OLAP workload. See ADR-001: Parquet-only Format.
Separate Run Table (DynamoDB)
- Why rejected: Adds operational complexity. Traceability and auditability are top priority; current design uses AWS-native identifiers (Step Functions execution ARN).
Related Decisions
- Design Decisions Summary - Complete trade-off analysis for this decision
- ADR-001: Parquet-only Format - Run isolation works with Parquet
- ADR-004: Quarantine + Condemned Layers - Error layers use run_id isolation
Implementation Evidence
- Code: ETL writes to
run_id={execution_name}/paths, promotion gate updates_LATEST.json - Documentation: Traceability Design - Run Identity - Run identity propagation
- Architecture: Data Lake Architecture - Run Isolation - Isolation pattern rationale