◈ DATA QUALITY GATES
Synthetic pipeline lab / Python + CSV

Catch bad records.
Before they move downstream.

A declarative contract turns six quality checks into a clear pipeline decision. Explore the evidence behind each failure.

examples/dirty.csv → report.json
01 / INGESTCSV parsed
02 / VALIDATE6 contract checks
03 / DOWNSTREAM GATEBlocked · exit 1
Records evaluated3Header excluded
Checks with violations6 / 6Report status: failed
Check violations12Overlapping check hits
Distinct bad records3Union of record numbers

Where the contract breaks

Select a check to inspect its offending records.

Bar length = violations · scale 0–3 records

Score bounds

3 offending records

Record numbers include the CSV header: first data record = 2. Quoted multiline values remain one CSV record. Cell values shown exactly; blanks and spaces use visible labels.

Check hits ≠ distinct bad records

The same record can fail several checks. The dirty run has 12 check violations across just 3 distinct records: 2, 3 and 4.

Quality failure versus execution error

Parseable cells such as bad, NaN or a timezone-free timestamp fail quality checks: exit 1. Invalid contracts return config_error / 2; unreadable or malformed CSV returns input_error / 3. These errors do not produce a normal six-check evaluation.