Context
A regional internet and TV provider (fictional) is retiring its billing system. The export has the usual problems: customers entered twice, contracts pointing to customers that do not exist, dates like 31.02.2019, undocumented status codes, amounts stored as text in cents.
Approach
# mapping/mapping_spec.csv (excerpt) entity,target_field,source_field,transform,required customer,customer_id,CUST_NO,surrogate_after_dedup,yes customer,national_id,DOC_NR,digits_only,yes customer,last_name,NAME_1,strip_title,yes customer,email,EMAIL,lower_validate_email,no
Reconciliation
These are the twelve checks as they come out of the last run:
Result
Output of the test case on synthetic data:
The 116 rejected contracts explain themselves: 51 because their customer was rejected, 30 orphans, 20 with impossible dates and 15 with unknown status codes. They go back to the business in rejects.csv to be fixed at source.
Deliverables
- Mapping spec that business and IT can review.
- Crosswalk between legacy and new IDs.
- Reconciliation report and rejects list with reasons.
- 8 tests that check every problem planted in the legacy data.
