Building a scalable Data Quality Validation Platform
How to design repeatable, high-volume data validation with decoupled storage and compute, declarative rules and actionable reporting.
This case study describes a generalized architecture informed by professional experience. It does not disclose proprietary datasets, credentials, client details or unapproved company performance claims.
The problem
Large data platforms need repeatable validation at scale, but running comprehensive checks against production transactional databases can increase load, slow teams down and complicate investigation. Manual spot checks do not provide consistent coverage or an auditable history.
Design goals
- Keep expensive validation computation away from production transactional systems.
- Run deterministic checks against immutable, date-partitioned snapshots.
- Express validation rules declaratively and version them with code.
- Support scheduled and targeted revalidation.
- Make failures searchable, explainable and exportable.
Reference architecture
How the components fit together
1. Ingest snapshots
Extract approved source records into date-partitioned Parquet objects in object storage. Keep ingestion idempotent, attach a schema version and preserve source timestamps for lineage.
2. Orchestrate execution
Dagster assets represent ingestion, rule execution and aggregation dependencies. Schedules cover routine runs; sensors detect missing partitions or newly available data. Retries should be bounded and safe.
3. Validate with DuckDB
DuckDB queries Parquet directly, avoiding repeated full-table scans on operational databases. Scope checks to affected partitions and record rule identifiers, sample failures and execution metadata.
4. Define quality rules
Great Expectations can express schema, nullability, range and domain constraints. Complex geospatial or aggregation logic may need custom SQL and explicit edge-case tests.
5. Report and alert
Store per-record or per-entity outcomes alongside daily aggregates. A lightweight dashboard helps filter by date, rule and entity. Alerts should include counts, representative examples and a link to investigation details.
Tradeoffs and failure modes
- Freshness: snapshot-based validation is not instantaneous; publish data latency clearly.
- Schema drift: detect breaking changes before validation and quarantine incompatible partitions.
- Duplicate execution: use run IDs and idempotent output paths to prevent double-counting.
- High-cardinality results: partition detailed results and pre-aggregate dashboard queries.
- Rule evolution: version rules so historical outcomes remain interpretable.
Measuring success
Useful measures include data coverage, checks executed, validation duration, cost per partition, false-positive rate, time to investigate, and the number of defects caught before downstream consumption. Publish exact results only after verification and approval.
Lessons learned
Separate operational data serving from validation compute. Treat quality checks as versioned code. Make every failure explainable. Design the reporting experience alongside the checks themselves rather than as an afterthought.