Data Quality Recovery System
Bell Canada
The investigation and repair work that found why historical data was missing and wrong, then recovered it — 130,000+ records — and stopped it from happening again.
Reports only went back a month and quietly disagreed with the source systems, so nobody fully trusted the analytics.
- 01The 30-day blind spot
- Broke
- An external validator flagged ~28,000 mismatched records, and history only reached back about a month when it should have covered years.
- Why
- A staging load had a hardcoded 30-day lookback filter, silently trimming everything older than a month on every run.
- Fix
- Traced it to that one filter, then ran a full historical recast from January 2025 through an isolated off-hours flow so it would not crush the daily job. Coverage went from 1 month to 9+ months and 130,000+ records came back.
- 023.5 million phantom rows
- Broke
- Joining events to the employee-hierarchy table multiplied rows — about 3.5 million duplicates — inflating every count built on top of it.
- Why
- The join flattened history with a MAX() subquery and keyed on a volatile mix of email and agent ID, so one event matched many hierarchy versions.
- Fix
- Switched to SCD Type 2 point-in-time joins (match the event to the hierarchy that was true on its date) with a stable composite key. The duplicates disappeared.
130,000+corrected records
800%coverage expansion
- SmartPath (REST API)
- Maximo (ERP)
- IPACT (Billing)
- LDAP (Directory)
- Ingest / Raw Landing
- Validate / Rules & Schemas
- Transforms / Standardize & Conform
- Canonical Trusted Dataset
| Metric | Before | After |
|---|---|---|
| Records corrected | — | 130,000+ |
| Analytical coverage | 1 month | 9+ months |
| Query latency (23M-row join) | 12 min | 2 min |
| Data incidents prevented | — | 15+/mo |
| Debugging time | baseline | −60% |
| Pipelines instrumented | — | 12+ |
Net Improvement: 130,000+ records corrected
| Check | Before | After | Status |
|---|---|---|---|
| Duplicate keys on retry | present | 0 | ✓ |
| Historical attribution (SCD Type 2) | drifted | resolved | ✓ |
| Count-by-stage proof | mismatch | reconciled | ✓ |
| Idempotent re-runs | none | enforced | ✓ |
| Event sequencing | sequential | two-pass | ✓ |
| Config-driven validation | ad hoc | automated | ✓ |
- 01DetectA count or latency mismatch trips an alert.
- 02ScopePin the affected sources, tables, and date ranges.
- 03Trace lineageFollow the data upstream to the first bad step.
- 04Repair / re-keyFix the transform or the load key at the root.
- 05BackfillReprocess history through an isolated flow.
- 06ReconcileProve counts match end to end.
- 07MonitorAdd a check so it cannot come back silently.
Impact — Resolved a data quality incident across historical pipelines. 130,000+ records corrected. Downstream metrics restored.
- SmartPath (REST API)
- Maximo (ERP)
- IPACT (Billing)
- LDAP (Directory)
- Ingest Layer (Raw Landing)
- Transform & Standardize
- Schema & Rules Validation
- Backfill & Repair
- Analytics (Dashboards)
- Reporting (BI / SQL)
- Ops Systems (Real-time)
Evidence before confidence.