EX-14: Weighted Similarity Scoring (Resolving £63M in Duplicates)
Track: Entity Resolution & MDM • Difficulty: Intermediate • Mastery Points: 150 PTS
Business Problem Scenario
Global DynaDatum Bank's customer overlap between legacy branch accounts and online banking contains 512 true duplicate customer entities. These unlinked accounts caused £63,000,000 in duplicate balance reporting on quarterly capital reserves. With candidate pairs isolated in silver.candidate_pairs, you must calculate a composite similarity score to identify duplicate customer entities across CRM and mainframe systems.
Engineering Objective
Write a similarity scoring query against silver.candidate_pairs to identify high-confidence duplicate entities. • Expected Columns: crm_id, cust_no, score • Scoring Weights & Criteria: - Email match: CASE WHEN crm_email = cob_email THEN 40 ELSE 0 END - Phone match: CASE WHEN crm_phone = cob_phone THEN 30 ELSE 0 END - Postcode presence: CASE WHEN postcode_std IS NOT NULL THEN 15 ELSE 0 END - Date of Birth presence: CASE WHEN dob IS NOT NULL THEN 10 ELSE 0 END - Levenshtein Name Distance <= 2: CASE WHEN levenshtein(lower(crm_name), lower(cob_name)) <= 2 THEN 5 ELSE 0 END • Configured Threshold: Filter where composite score >= 70. Order by score DESC. Key Concepts: - Weighted Probabilistic Matching: Scoring multi-attribute evidence to classify candidate entity pairs with high statistical confidence.
Target Table: silver.candidate_pairs (crm_id STRING, cust_no STRING, crm_name STRING, cob_name STRING, crm_email STRING, cob_email STRING, crm_phone STRING, cob_phone STRING, postcode_std STRING, dob DATE)
Verification & Architecture Insights
Building on the candidate blocking in EX-13, weighted multi-attribute similarity scoring across email, phone, and name eliminates duplicate customer clusters, directly resolving £63M in double-counted deposits.