13. Metadata and the catalogue
Metadata is data about data: what a table holds, what it means and what happens to it. A catalogue gathers all three in one place, so anyone can find an asset, understand it and see whether it can be trusted.
The clip shows Harbour Mutual's claims table in a catalogue. First a scanner reads the database: the columns, their data types and the keys. Then people add what a scanner cannot know: what the table means, its owner and steward, the glossary terms its columns implement and how sensitive each column is. Then the pipelines add what happens to it every night: the rows, the last load and the quality scores. Last, Microsoft Purview's Data Map and Unified Catalog as the Azure form.
The idea: three layers of metadata, one place to find them
Every asset in the estate, a table, a file, a report, carries three kinds of metadata:
- Technical: what the data is. Columns, data types, keys, where it is stored. A scanner reads it from the database, so it is cheap and always up to date.
- Business: what it means. A description, an owner and a steward, the glossary terms its columns implement, how sensitive it is. Only people know it, so it is the expensive layer and the one most often missing.
- Operational: what happens to it. How many rows, when it was last loaded and by which job, its quality scores. The pipelines write it every time they run.
A data catalogue brings the three layers together and lets people search them: "where is our claims data, what does reserve mean, who owns it, and was it loaded last night?" One answer, in one place, instead of four people asked in four meetings.
A worked example: the claims table in the catalogue
The scanner finds 8 columns in Harbour Mutual's claims table, their types and its keys, in seconds. It cannot know that reserve is what the handler still expects to pay, that Ruud Hendriks owns the data, or that 2 of its columns are confidential: those come from people. The nightly extract then records 60 rows and the time it ran.
SELECT column_name, data_type, is_nullable
FROM information_schema.columns
WHERE table_schema = 'public' AND table_name = 'claims'
ORDER BY ordinal_positionSome business metadata can live in the database too: the lab's DDL writes each column's description as a comment, and a scanner reads it back. That is where the descriptions should start, next to the data, so they do not drift.
SELECT a.attname AS column_name, COL_DESCRIPTION(a.attrelid, a.attnum) AS description
FROM pg_attribute a
WHERE a.attrelid = 'claims'::REGCLASS AND a.attnum > 0 AND NOT a.attisdropped
AND COL_DESCRIPTION(a.attrelid, a.attnum) IS NOT NULL
ORDER BY a.attnum| Layer | Kind of metadata | Where it comes from |
|---|---|---|
| Technical | The columns and their data types | a scanner reading the database |
| Technical | The primary key and the foreign keys | a scanner reading the database |
| Technical | Which columns may be empty | a scanner reading the database |
| Business | What the table and each column mean, in words | people: the owner and the steward |
| Business | Who owns the data and who looks after it | people: the governance roles |
| Business | The glossary terms its columns implement | people: the glossary's owners |
| Business | How sensitive each column is | people, helped by the scanner's suggestions |
| Operational | How many rows it holds | the pipelines and the scanner, every run |
| Operational | When it was last loaded, and by which job | the pipelines, every run |
| Operational | Its quality scores against its rules | the quality checks, every run |
Why it matters for Alex
After the merger, Alex will be asked "do we have data on X?" every week, about two estates nobody knows in full. Without a catalogue, the answer depends on who Alex happens to ask. With one, the question is a search, and the answer says who to talk to.
It is also the first thing an AI assistant needs (chapter 34): an assistant can only use data it can find and whose meaning is written down.
Where it goes wrong
- Scan and stop. A catalogue with only the technical layer is a list of thousands of tables nobody understands. The business layer is the work.
- Describing everything at once. Start with the assets the board and the merger depend on, not with every staging table.
- No owner on the entry. A description nobody owns is out of date the day a column changes. Every published entry names its owner.
- A separate tool nobody opens. Put the catalogue where people already look: link it from reports and from the data platform.
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.
Sort the metadata into its layer
Each item is something the catalogue holds about the claims table. Choose the layer it belongs to.
Find what each entry lacks
These catalogue entries were drafted for the merger's first assets. For each one, choose what it still lacks before it can be published, if anything.
fact_claim in Data warehouse. Description: "One row per claim, with what it has cost so far.". Owner: Ruud Hendriks. Classification: Confidential. Terms: Incurred claims.
stg_claims in Data warehouse. Description: none. Owner: Sanne Mulder. Classification: Confidential. Terms: Claim.
Board semantic model in Board reporting. Description: "The measures the board pack reads.". Owner: none. Classification: Internal. Terms: Loss ratio.
claim_documents in Claim documents. Description: "Adjusters' notes, photos and invoices, per claim.". Owner: Ruud Hendriks. Classification: none. Terms: Claim.
Link each column to its term
Each column below is an asset in the catalogue. Choose a glossary term it implements, so people searching for the word find the column.
fact_claim.incurred_amount
Board semantic model.loss_ratio
fact_claim.reserve_amount
claims.reported_date
claims.cause
On Azure
On Azure, the catalogue is Microsoft Purview, in two parts:
- The Data Map scans sources on a schedule (Azure SQL, Azure Data Lake Storage, Azure Databricks, Microsoft Fabric, Power BI, SQL Server on premises through a self-hosted runtime, and many more) and keeps their technical metadata. Its scan rules suggest classifications, such as an email address or a bank account number, and it records lineage from the pipelines it knows (chapter 14).
- The Unified Catalog holds the business layer: governance domains, data products, glossary terms, owners and critical data elements, with data quality scores and health reports on top. It is where people search.
- Descriptions and owners are written by people in the Unified Catalog, or come from the source where it has them, such as column comments.
Scan the systems the board's numbers come from first, then describe what was found, one domain at a time.
Take it to work
Catalogue entry
Describe one data asset so that anyone can find it, understand it and judge whether to trust it.
Technical
- Where it is stored, its columns and types, its keys
- Which scanner keeps this up to date, and how often?
Business
- What it means, in one or two sentences
- Its owner and steward
- The glossary terms its columns implement
- Its classification
Operational
- How often it is loaded, and by which job
- Its quality rules and their latest scores
Publishing
- Who reviews the entry before it is published?
- Where will people meet it: reports, the platform, search?
Tools in this chapter
- Lineage explorer · Trace a number back to its sources, or a change forward to everything it breaks.
- Information map · The enterprise information map: capabilities, domains, systems, flows and platforms, each layer switched on or off.
Terms taught here: MetadataData catalogueMicrosoft Purview