10. Taxonomies and controlled vocabularies
Different systems use different words for the same thing. A controlled vocabulary agrees one list of terms; a taxonomy arranges them in a hierarchy, and every system's codes are mapped to it, so reports group the same things together.
The clip shows the loss causes three systems record: Harbour Mutual's claims system writes escape of water, Kestrel writes WTR, and the broker portal's form says leak. A hierarchy of six top concepts appears, and the codes are mapped into it system by system, while a dashboard of both companies' claims regroups as each system joins. Two of Kestrel's claims stay unmapped because their codes are on no list. Last, the hierarchy written as SKOS, and the checks it must pass.
The idea: one list of words, arranged, with every system's codes mapped to it
A controlled vocabulary is an agreed list of terms for one subject: here, the causes of a loss. A taxonomy arranges those terms in a hierarchy, from broad to narrow: Water damage, and under it Escape of water. Each term is a concept, with a preferred label, other labels people use, a definition, and the codes each system uses for it.
The systems keep their own codes. The taxonomy does not ask the claims system to stop writing escape of water or Kestrel to stop writing WTR; it maps both to one concept, so a report can count them together. That is why a taxonomy is cheap to introduce: nobody's system changes on day one.
skos:prefLabel, skos:altLabel, skos:broader, skos:notation for the codes, and skos:definition. The lab writes its taxonomies in SKOS and checks them with a real RDF parser.A worked example: the merger's loss causes
Harbour Mutual's claims system, Kestrel's policy and claims package and the broker portal use 20 different codes for 8 kinds of loss. Mapped into one hierarchy of 6 top concepts, both companies' claims are counted together; 2 of Kestrel's claims stay unmapped, because their codes, wtr and ONB, are on no list.
| Top concept | Claims |
|---|---|
| Water damage | 7 |
| Weather | 18 |
| Theft | 9 |
| Fire | 14 |
| Vehicle damage | 24 |
| Travel incident | 26 |
| Not mapped | 2 |
Here is one family of the taxonomy as the lab writes it in SKOS, generated from the same concepts the builder edits; the lab's checks load it with rdflib and test SKOS's integrity rules.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix lc: <https://cloud-data-architecture-lab.azurewebsites.net/id/loss-causes/> .
lc:scheme a skos:ConceptScheme ;
dct:title "Loss causes"@en ;
skos:hasTopConcept lc:water .
lc:water a skos:Concept ;
skos:inScheme lc:scheme ;
skos:prefLabel "Water damage"@en, "Waterschade"@nl ;
skos:definition "Damage caused by water, inside or from outside the building."@en ;
skos:narrower lc:escape-of-water ;
skos:topConceptOf lc:scheme .
lc:escape-of-water a skos:Concept ;
skos:inScheme lc:scheme ;
skos:prefLabel "Escape of water"@en, "Lekkage"@nl ;
skos:altLabel "leak"@en ;
skos:altLabel "burst pipe"@en ;
skos:definition "Water escaping from pipes, tanks or appliances."@en ;
skos:notation "escape of water" ;
skos:notation "WTR" ;
skos:notation "leak" ;
skos:broader lc:water .
Why it matters for Alex
Every merger report that groups claims by cause depends on this mapping. Without it, Alex's first combined dashboard will show escape of water and WTR as two different causes, and the board will ask why water damage halved after the merger.
A taxonomy is also where reference data (chapter 20) starts: one managed list, versions, and mappings from every source. And it is the first step towards the graph of chapter 11.
Where it goes wrong
- Codes on broad concepts. Mapping WTR to Water damage instead of Escape of water loses detail that another source has: map each code to the most specific concept that fits.
- A hierarchy nobody owns. When anyone can add a concept, the tree grows duplicates (Leak, Leakage, Water leak) within a year. Give it an owner, as any reference list (chapter 21).
- Cycles and orphans. A concept under its own child, or under one that was deleted, breaks every report that rolls up the tree. Check the tree every time it changes.
- Forcing every system to change its codes. Months of work for nothing a mapping could not do in a day.
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.
Bring Kestrel's codes in
Kestrel's eight loss-cause codes (WTR, STRM, DIEF, BRD, AANR, GLAS, MED, BAG) have just arrived and are under no concept. Map each one to the concept that means the same, so both companies' claims are counted together.
The lab checks that:
- Every source code is under exactly one concept.
- Codes that mean the same kind of loss share a top concept, and other codes do not.
- Codes sit on the most specific concept: a concept with narrower concepts holds no codes.
- No concept is its own broader concept, and every broader concept exists.
Repair the hierarchy
Someone has edited the taxonomy: Water damage was moved under Escape of water, and Vehicle damage was deleted, leaving Collision and Windscreen under a concept that no longer exists. Repair it so the SKOS file passes the checks again.
The lab checks that:
- No concept is its own broader concept, and every broader concept exists.
- Every source code is under exactly one concept.
- Codes that mean the same kind of loss share a top concept, and other codes do not.
- Codes sit on the most specific concept: a concept with narrower concepts holds no codes.
Name the SKOS property
Each statement is something the loss-cause taxonomy says about Escape of water. Choose the SKOS property that says it.
On Azure
Azure has no SKOS service, so a taxonomy lives in three places:
- The source: the SKOS file in Git, reviewed like code, with its owner and a version for every change.
- The mapping: a reference table of source codes and concepts, loaded into the lakehouse (a Delta table in Microsoft Fabric or Azure Databricks), which the silver layer joins to conform every source's codes (chapter 20).
- The business view: the top concepts as glossary terms in the Microsoft Purview Unified Catalog, each with its definition and owner, so people find the meaning where they find the data (chapter 12).
Generate the reference table from the SKOS file, not the other way round, so the file reviewed in Git is the one the reports use.
Take it to work
Taxonomy card
Describe one taxonomy so its owner and its users agree on it.
The subject
- What does it classify, and who owns it?
- Which reports and systems depend on it?
The concepts
- The top concepts, with a definition each
- The rule for adding a concept, and who approves it
The mappings
- Which systems' codes are mapped, and which are still missing?
- What happens to a code that is on no list?
The checks
- Every code once, no orphans, no cycles: who runs them, when?
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: TaxonomyControlled vocabularySKOS