# A row-count check authored in test passes cleanly there and fires repeatedly in production for reaso

Canonical URL: <https://datadriven.io/problems/a-row-count-check-authored-in-test-passes-cleanly-there-and-f68c9d18>

Domain: Pipeline Design · Difficulty: medium

## Problem

A row-count check authored in test passes cleanly there and fires repeatedly in production for reasons unrelated to data quality. Test fixtures load the same rows daily; production carries live traffic with calendar effects. The section's discipline: keep the assertion identical across environments and load thresholds from environment-specific config. The opposite mistake (a check that passes in production because the threshold matches whatever the producer is currently emitting) is also wrong because it cannot detect drift. Compare dev vs prod thresholds by replacing the single quality-check transform with one whose name states the shared assertion plus environment-aware threshold sourcing (config keyed on environment).

## Related

- [All practice problems](https://datadriven.io/problems)
- [Mock interview mode](https://datadriven.io/interview/a-row-count-check-authored-in-test-passes-cleanly-there-and-f68c9d18)
- [System Design Interview Questions](https://datadriven.io/data-engineering-system-design)
- [Data Engineering Interview Prep Guide](https://datadriven.io/data-engineer-interview-prep)
- [Daily Challenge](https://datadriven.io/daily)

---

Source: DataDriven (https://datadriven.io). 100% free data engineering interview prep. Live code execution against Postgres 16, Python 3.11, and Spark sandboxes. No paywall, no premium tier, no signup gate.