20. Reference data
Reference data is the codes everyone uses: product lines, statuses, causes, countries, currencies. Managed well, it is one list per subject, with every system's codes mapped to it and every change kept as a version, so codes mean the same everywhere and history survives.
The clip shows four code lists as each company writes them: product lines, policy statuses, claim statuses and loss causes. A managed list appears for each, and every code the two companies' systems use is mapped to it. Two of Kestrel's codes stay on no list, on purpose: they are defects in the data. Then the loss cause windscreen is retired on 1 January 2026, with an end date, and glass breakage starts the next day. Last year's report still shows windscreen; overwriting the code would have changed it, and deleting it would have left last year's claims unmapped.
The idea: one managed list, mappings, and versions
Reference data is the small, slow-changing sets of codes other data points at: product lines, policy and claim statuses, loss causes, and the standard ones such as ISO country and currency codes. Each system keeps its own, and they differ: Harbour Mutual writes motor, Kestrel AUTO.
- One managed list per subject, owned by someone in the business, with a code, a label and the dates each code is valid.
- Mappings from every system's codes to the managed codes. Nobody's system changes; the platform maps the codes as the data arrives (in the silver layer, chapter 26).
- Versions: a code is never deleted or overwritten. It gets an end date, and its successor a start date, so a report about any period maps each record with the codes valid then.
A worked example: four lists, and a code retired
The two companies' systems use 37 codes in these four lists. All but Kestrel's two planted codes are mapped to managed codes. From 2026, Kestrel's GLAS covers all glass, so the combined list ends windscreen on 31 December 2025 and starts glass breakage the next day.
| System | List | Source code | Until 2025 | From 2026 |
|---|---|---|---|---|
| sys-catalogue | Product line | home | Home | Home |
| sys-catalogue | Product line | motor | Motor | Motor |
| sys-catalogue | Product line | travel | Travel | Travel |
| kes-polis | Product line | AUTO | Motor | Motor |
| kes-polis | Product line | REIS | Travel | Travel |
| kes-polis | Product line | WOON | Home | Home |
| sys-pas | Policy status | active | Active | Active |
| sys-pas | Policy status | cancelled | Cancelled | Cancelled |
| sys-pas | Policy status | expired | Expired | Expired |
| kes-polis | Policy status | A | Active | Active |
| kes-polis | Policy status | G | In grace period | In grace period |
| kes-polis | Policy status | O | Cancelled | Cancelled |
| kes-polis | Policy status | V | Expired | Expired |
| sys-claims | Claim status | closed | Closed | Closed |
| sys-claims | Claim status | open | Open | Open |
| sys-claims | Claim status | rejected | Rejected | Rejected |
| kes-polis | Claim status | afgewezen | Rejected | Rejected |
| kes-polis | Claim status | gesloten | Closed | Closed |
| kes-polis | Claim status | open | Open | Open |
| sys-claims | Loss cause | baggage | Baggage | Baggage |
| sys-claims | Loss cause | collision | Collision | Collision |
| sys-claims | Loss cause | escape of water | Escape of water | Escape of water |
| sys-claims | Loss cause | fire | Fire | Fire |
| sys-claims | Loss cause | medical | Medical expenses | Medical expenses |
| sys-claims | Loss cause | storm | Storm | Storm |
| sys-claims | Loss cause | theft | Theft | Theft |
| sys-claims | Loss cause | windscreen | Windscreen | Glass breakage |
| kes-polis | Loss cause | AANR | Collision | Collision |
| kes-polis | Loss cause | BAG | Baggage | Baggage |
| kes-polis | Loss cause | BRD | Fire | Fire |
| kes-polis | Loss cause | DIEF | Theft | Theft |
| kes-polis | Loss cause | GLAS | Windscreen | Glass breakage |
| kes-polis | Loss cause | MED | Medical expenses | Medical expenses |
| kes-polis | Loss cause | ONB | Unmapped | Unmapped |
| kes-polis | Loss cause | STRM | Storm | Storm |
| kes-polis | Loss cause | WTR | Escape of water | Escape of water |
| kes-polis | Loss cause | wtr | Unmapped | Unmapped |
Each claim is mapped with the code valid on its loss date, so last year's report reads windscreen and this year's glass breakage, from one list:
WITH cause_map (source_code, managed_code, valid_from, valid_to) AS (
VALUES
('collision', 'COLLISION', DATE '2000-01-01', DATE '9999-12-31'),
('theft', 'THEFT', DATE '2000-01-01', DATE '9999-12-31'),
('windscreen', 'WINDSCREEN', DATE '2000-01-01', DATE '2025-12-31'),
('windscreen', 'GLASS', DATE '2026-01-01', DATE '9999-12-31'),
('storm', 'STORM', DATE '2000-01-01', DATE '9999-12-31'),
('escape of water', 'ESCAPE_OF_WATER', DATE '2000-01-01', DATE '9999-12-31'),
('fire', 'FIRE', DATE '2000-01-01', DATE '9999-12-31'),
('medical', 'MEDICAL', DATE '2000-01-01', DATE '9999-12-31'),
('baggage', 'BAGGAGE', DATE '2000-01-01', DATE '9999-12-31')
)
SELECT COALESCE(m.managed_code, 'UNMAPPED') AS cause, COUNT(*) AS claims
FROM claims c
LEFT JOIN cause_map m ON m.source_code = c.cause AND c.loss_date BETWEEN m.valid_from AND m.valid_to
WHERE c.loss_date BETWEEN DATE '2025-01-01' AND DATE '2025-12-31'
GROUP BY 1
ORDER BY COALESCE(m.managed_code, 'UNMAPPED') COLLATE "C"WITH cause_map (source_code, managed_code, valid_from, valid_to) AS (
VALUES
('collision', 'COLLISION', DATE '2000-01-01', DATE '9999-12-31'),
('theft', 'THEFT', DATE '2000-01-01', DATE '9999-12-31'),
('windscreen', 'WINDSCREEN', DATE '2000-01-01', DATE '2025-12-31'),
('windscreen', 'GLASS', DATE '2026-01-01', DATE '9999-12-31'),
('storm', 'STORM', DATE '2000-01-01', DATE '9999-12-31'),
('escape of water', 'ESCAPE_OF_WATER', DATE '2000-01-01', DATE '9999-12-31'),
('fire', 'FIRE', DATE '2000-01-01', DATE '9999-12-31'),
('medical', 'MEDICAL', DATE '2000-01-01', DATE '9999-12-31'),
('baggage', 'BAGGAGE', DATE '2000-01-01', DATE '9999-12-31')
)
SELECT COALESCE(m.managed_code, 'UNMAPPED') AS cause, COUNT(*) AS claims
FROM claims c
LEFT JOIN cause_map m ON m.source_code = c.cause AND c.loss_date BETWEEN m.valid_from AND m.valid_to
WHERE c.loss_date BETWEEN DATE '2026-01-01' AND DATE '2026-12-31'
GROUP BY 1
ORDER BY COALESCE(m.managed_code, 'UNMAPPED') COLLATE "C"Why it matters for Alex
Every combined report the merger needs (claims by cause, policies by status, premium by product line) depends on these mappings. And the auditors will re-run last year's figures: if a code change rewrote history, Alex has to explain numbers that changed after they were signed off.
Where it goes wrong
- Editing a code in place. Renaming windscreen to glass breakage rewrites every past report that used it, silently.
- Deleting a retired code. Last year's records point at nothing and fall out of every total.
- Mapping the defects. Adding wtr and ONB to the list makes the bad data look valid; fix them at the source (chapter 15).
- Lists in every spreadsheet. A code list copied into ten workbooks is ten lists within a year. Keep one, owned, and publish it.
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.
Map Kestrel's codes
Each code below is one Kestrel's package uses. Choose the managed code it means.
AUTO (product line)
REIS (product line)
WOON (product line)
A (policy status)
G (policy status)
O (policy status)
V (policy status)
afgewezen (claim status)
gesloten (claim status)
Retire a code without breaking history
Windscreen must give way to glass breakage from 1 January 2026. Each line is a way to do it. Choose what each does to last year's report.
Read the versions
With windscreen ended on 31 December 2025 and glass breakage started on 1 January 2026, choose what each claim's cause is in the combined reports.
On Azure
Azure has no reference data service of its own. A pattern that works:
- The source of truth: each list as a file in Git (or a table with an owner and a review), with codes, labels, valid-from and valid-to dates, and the mappings from every system.
- Published to the lakehouse: a Delta table in Microsoft Fabric or Azure Databricks, which the silver layer joins on the record's date to conform every source's codes.
- Found in the catalogue: the lists registered in Microsoft Purview's Unified Catalog as data assets with owners, and their subjects as glossary terms.
Never let a pipeline edit the list: changes go through the owner's review, as a new version.
Take it to work
Code list card
Describe one managed code list so it stays one list, with history.
The list
- Its subject and its owner
- Its codes, labels and valid dates
The mappings
- Every system that uses these codes, and each source code's managed code
- What happens to a code that is on no list?
Changes
- Who approves a new or retired code?
- How is a retired code ended, and its successor started?
Publishing
- Where do the pipelines read it, and where do people find it?
Tools in this chapter
- Taxonomy and ontology builder · Build a hierarchy or a small graph, export it as SKOS or Turtle, and query it.
Terms taught here: Reference data