ADR-0009: Expectations and quarantine¶
Architecture: Section 10, Data quality
Context¶
Data quality is a first-class feature (lesson L13). Rules need a clear action when a row or a dataset violates them, and failing rows should not vanish silently.
Options¶
- Fail-only checks. Simple, but one bad row stops the run.
- DLT-style actions (warn, drop, fail) plus quarantine. Lets users choose per rule, and keeps dropped rows for inspection.
Decision¶
DLT-style actions plus quarantine, evaluated after the transformation and before the write.
- Row-level checks:
not_null,accepted_values,range,regex,expr. Actions: warn, drop, fail. - Aggregate checks:
unique,row_count,freshness. Actions: warn, fail.dropis PLP403. EngineSession.evaluatecomputes every row-level predicate in one aggregate pass and returns per-expectationpassedandfailedcounts. Unlike DLT, counts are kept onfailtoo.dropfilters rows that fail anydroppredicate. Ifmax_drop_ratiois exceeded, the unit fails with PLQ301.- With
quality.quarantine: true, dropped rows go to<target>__quarantinewith_pipeloom_run_id,_pipeloom_failedand_pipeloom_ts. - Lazy engines may cache the relation before the counting pass. The engine decides, and the decision is recorded in the metadata.
Consequences¶
- Results appear in
run_results.jsonand inmodel.quality_evaluatedevents. - Expressions in
exprchecks use the engine's dialect and are not portable. - A quarantine table is extra storage that users must manage.
Status¶
Accepted
Date¶
2026-10-29