18. Master data 1: matching and survivorship
Master data is the data the business shares across systems: customers, products, brokers. Matching finds the records that are the same thing; survivorship builds one golden record from them, attribute by attribute.
The clip shows ten customer records from Harbour Mutual's CRM and eight from Kestrel side by side. The matching engine links them rule by rule: the same email, the same name and birth date, then a similar name with the same birth date. At a threshold of 0.90, one true pair is missed: an initial. At 0.85 the initial is found, but twins are merged. With a rule for initials at 0.90, every true pair is found and nobody is merged wrongly. Last, golden records form, each attribute from the record the survivorship rules choose.
The idea: match, then survive, one attribute at a time
Master data is the data many systems share and the business runs on: who the customers are, which products exist, which brokers sell them. After a merger the same customer is in both companies' systems, written differently. Master data management makes one golden record per real-world thing, in three steps:
- Match: decide which records are the same person. Deterministic rules are exact (the same email; the same name and birth date). Fuzzy rules score how similar two names are (here Jaro–Winkler, from 0 to 1) and match above a threshold.
- Measure the matching against an answer key: precision (of the pairs merged, how many are right) and recall (of the true pairs, how many were found). A false merge hurts precision; a missed match hurts recall.
- Survive: build the golden record attribute by attribute, each from the record a rule chooses: the most trusted source, the most recent change, or the most complete value.
A worked example: eighteen records, six people in both
On chapter 18's sample, the default rules find 5 of 6 true pairs with no false merge: precision 100%, recall 83%. A rule for initials finds the last one. On both companies' full customer bases, the same rules find 9 shared customers with precision 100% and recall 100%: the number the CFO asked for.
| Golden record | Name | Address | Phone | |
|---|---|---|---|---|
G001 (H01 + K01) | Jan de Vries | jan.devries@example.com | Keizersgracht 300, Amsterdam | +31 20 555 0101 |
G002 (H02 + K02) | Łukasz Wójcik | lukasz.wojcik@example.com | ul. Długa 5, Kraków | +48 12 555 0122 |
G003 (H03 + K03) | Annelies Bakker | a.bakker@example.com | Oudegracht 40, Utrecht | +31 30 555 0133 |
G004 (H04 + K04) | Sanne Visser | sanne.visser@example.com | Laan 3, Den Haag | +31 70 555 0144 |
G005 (H05 + K05) | Markus Schneider | m.schneider@example.com | Isarweg 8, München | +49 89 555 0155 |
G007 (H07 + K07) | Zofia Nowak | — | ul. Polna 2, Warszawa | +48 22 555 0177 |
The deterministic rules are plain SQL. Here they run on both companies' customer tables, the names normalised the way the engine does (lower case, accents and punctuation removed):
WITH source_records AS (
SELECT 'H' || LPAD(customer_id::TEXT, 2, '0') AS id, 'sys-crm' AS source, name, birth_date, email FROM customers
UNION ALL
SELECT 'K' || LPAD(klant_nr::TEXT, 2, '0'), 'kes-klant', naam, geboortedatum, email FROM klanten
), normalised AS (
SELECT id, source, birth_date, LOWER(email) AS email, BTRIM(REGEXP_REPLACE(TRANSLATE(REPLACE(REPLACE(LOWER(name), 'ł', 'l'), 'ß', 'ss'), 'óüś', 'ous'), '[^a-z]+', ' ', 'g')) AS name
FROM source_records
)
SELECT a.id || '+' || b.id AS pair
FROM normalised a JOIN normalised b ON a.id < b.id AND a.source <> b.source
WHERE a.email = b.email OR (a.birth_date = b.birth_date AND a.name = b.name)
ORDER BY (a.id || '+' || b.id) COLLATE "C"Why it matters for Alex
"How many customers do we share with Kestrel?" is the CFO's first question about the deal, and the answer moves the price of cross-selling. Count with a loose threshold and twins become one customer; count with exact rules only and a married name becomes two. Alex has to give a number with its precision and recall, and say why the rules are set as they are.
Where it goes wrong
- One threshold for everything. The fuzzy score cannot tell twins from a typo. Add rules that use other evidence (initials, email, address) before loosening it.
- No answer key. Without a set of pairs known to be right, precision and recall are guesses. Build one from a sample a steward has checked.
- Survivorship by source alone. "Harbour Mutual wins" keeps old email addresses and old surnames. Decide per attribute.
- Merging for ever. A false merge must be undoable: keep the source records and the reason they were merged.
Exercises
The lab checks each one against facts written down in advance, so any answer the brief allows passes. A pass is kept in this browser.
Build the golden records
On chapter 18's sample, the CFO wants every customer counted once: no false merge and no missed match. The CRM checks each new customer's identity document, so a golden record's name comes from the CRM; people move, so its address comes from whichever record changed last.
The lab checks that:
- Precision is 100%: no two different people are merged.
- Recall is 100%: every pair in the answer key is matched.
- Every golden record built from both companies takes its name from the CRM.
- Every golden record's address comes from the record that changed last.
Right merge, false merge or missed?
Each line is a pair from chapter 18's sample, matched with the email and name rules and a fuzzy threshold, without the rule for initials. Say what the run makes of it.
Choose survivorship per attribute
For each attribute of the golden customer record, read what the brief says about it and choose how its value survives.
name: The CRM checks every new customer's identity document; Kestrel's customers typed their own names.
email: Customers change their email in Kestrel's app; the CRM's addresses are years old.
address: People move, and whichever record changed last has the current address.
phone: Phone numbers are often missing, and nobody checks them: any number beats none.
On Azure
Azure has no master data management service of its own. Three ways to do it on Azure:
- A master data management product from a partner, running on Azure and bought through the Azure Marketplace, with its own matching, survivorship and steward screens, and its golden records registered in Microsoft Purview.
- Dynamics 365 Customer Insights - Data unifies customer profiles from many sources with deduplication, match and merge rules: Microsoft's own product, for customer data.
- Your own consolidation in the lakehouse: the matching in notebooks (Azure Databricks or Microsoft Fabric), the golden record as a gold table with its source keys, and the steward's queue as a table, as in this chapter.
Whichever you choose, keep the answer key and measure precision and recall every time the rules change.
Take it to work
Match and survivorship design
Decide how records of one master data domain are matched and how the golden record is built.
Matching
- The exact rules, in order
- The fuzzy rule, its threshold, and why there
- The answer key it is measured against, and the target precision and recall
Survivorship
- For each attribute: most trusted source, most recent or most complete?
- The reason, from the sources' facts
Undo
- How is a false merge found and undone?
Tools in this chapter
- Match and merge · Tune matching and survivorship on two customer bases and watch precision, recall and the golden records change.
Terms taught here: Master dataMatchingGolden recordSurvivorshipPrecisionRecallData steward