DataEng study
Offline — showing the cached copy.
Home / Data Engineering System Desi / 10. Data quality and contracts

10. Data quality and contracts

One-liner. Test the properties you rely on, at the boundary and in the marts.

Memorize

  • Four checks: schema, freshness, volume, distribution/nullability/uniqueness.
  • Contracts: producer guarantees schema + semantics + SLA; violations fail the pipeline, not the dashboard.
  • Fail early (ingest) and loudly (alert), not silently downstream.
  • Quarantine bad rows instead of dropping them; track a reject rate.
  • Reconciliation: row counts and sums between layers catch silent bugs.
  • Quality is a pipeline stage, not a quarterly audit.
QUALITY GATES Ingest Contract check Pass: transform Fail: quarantine+ alert Publish Reconcile
Quality gates

Trap. Testing only the gold layer — by then a bad join has already polluted every aggregate. Do this. Put a reconciliation check between every pair of layers you own.

Check

A nullable column suddenly becomes 40% null in silver. Which control detects this before dashboards break?