Theory · Page 12 of 34 · Meaning and metadata

12. Lineage: column level, and OpenLineage

Lineage is the record of where data comes from and where it goes: which sources, through which steps, into which reports. At column level it can say which numbers a change will break; written as OpenLineage events, any tool can collect and read it.

The board's loss ratio traced at three levels, then written down
Playback speed

The clip traces the board's loss ratio backward through Harbour Mutual's estate, three times at three levels of detail. At system level, the systems it passes through. At table level, the datasets. At column level, every column hop by hop back to the sources, from the engine's own walk. Then the semantic model's refresh job is written as an OpenLineage run event: the job, the run with its start and completion, the input and output datasets, and the facets that carry the schema and the column lineage.

The intuition: a family tree for every number

The CFO points at Harbour Mutual's board pack: where does this loss ratio come from? Without lineage the honest answer is "we will find out", and a week of reading SQL. With lineage it is a path: from the semantic model, back through the warehouse, to the claims system's reserves and payments and the billing system's premium instalments.

The same path, read the other way, answers the question every change request should ask: the claims system will rename a column next release; what breaks? Lineage forward from that column lists every table, report and model that reads it, before the release, not after.

How fine the path is decides what it can answer. "The warehouse feeds the BI model" is true and useless for a change to one column. Only lineage at column level can say that renaming reserve breaks the warehouse columns that read it directly, reaches the board's loss ratio, and leaves the premium side alone.

Remember Backward lineage explains a number; forward lineage predicts what a change breaks. Only column-level lineage answers both precisely.

The theory: granularity, direction, collection and OpenLineage

Lineage is the record of data's origins and movements: the datasets, the transformations between them, and the order. Provenance is the wider record of everything that influenced a piece of data, including who and when; the W3C's PROV model describes it with three kinds of node, entities (data), activities (processes) and agents (people and software).

Lineage comes at three main levels. System level shows which systems feed which, like the information map's flows (chapter 3). Table level (or dataset level) shows which tables and files a job reads and writes. Column level (or field level) shows which input columns each output column is computed from, and how. Each level down costs more to collect and answers more.

It is read in two directions. Backward (upstream) lineage traces a value to its sources: to explain a number, or to find a quality problem's root cause. Forward (downstream) lineage traces a source to everything that uses it: impact analysis before a change.

A column can depend on another in two ways. A direct dependency means the input's value flows into the output: copied (identity), computed (transformation) or summarised (aggregation). An indirect dependency means the input decides which rows or groups there are without its value appearing: a join key, a filter, a GROUP BY. Renaming a filter column breaks a job as surely as renaming a summed one.

How lineage is collected Static collection parses code (SQL, Spark jobs, dbt models) to work out what reads and writes what; it covers code that has not run yet, but misses anything decided at run time. Runtime collection has the job report what it actually read and wrote as it runs; it is exact for what ran, and blind to what did not. Manual lineage records the hops no tool can see, such as a spreadsheet typed into the ledger. Most estates need all three, and should mark which hops were declared by hand.

OpenLineage is an open standard, hosted by the Linux Foundation's LF AI & Data, for collecting lineage at run time. Its core model has three entities: a job (a process that runs, such as a nightly refresh), a run (one execution of it, with a unique id) and a dataset (what a run reads or writes), each named by a namespace and a name. A run sends run events as it goes: START, RUNNING, COMPLETE, ABORT or FAIL.

Everything else is a facet: a small, typed piece of metadata attached to a run, a job or a dataset, each with its own published schema. The schema facet lists a dataset's columns; the column lineage facet lists, for each output column, the input columns it comes from and each transformation's type (DIRECT or INDIRECT) and subtype (such as IDENTITY, TRANSFORMATION or AGGREGATION, or JOIN, FILTER and GROUP_BY for indirect ones). Integrations for Spark, Airflow, dbt and others emit these events automatically; the reference server, Marquez, stores them, and catalogues such as Microsoft Purview read them.

Here is the semantic model's nightly refresh as an OpenLineage run event, generated from the lineage the engine walks back from the board's loss ratio. CI validates it against the OpenLineage specification's JSON schemas. It carries 2 input datasets and 2 column dependencies.

The semantic model's refresh as an OpenLineage run event (JSON, validated against the specification's schemas in CI)
[
  {
    "eventType": "COMPLETE",
    "eventTime": "2026-10-17T02:00:00Z",
    "producer": "https://cloud-data-architecture-lab.azurewebsites.net/tools/lineage-explorer",
    "schemaURL": "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/RunEvent",
    "run": {
      "runId": "79c967ba-a71e-3fe4-8d12-c1d93936bfd1"
    },
    "job": {
      "namespace": "harbour-mutual",
      "name": "flow-dw-bi"
    },
    "inputs": [
      {
        "namespace": "harbour-mutual.sys-dw",
        "name": "fact_claim",
        "facets": {
          "schema": {
            "_producer": "https://cloud-data-architecture-lab.azurewebsites.net/tools/lineage-explorer",
            "_schemaURL": "https://openlineage.io/spec/facets/1-2-0/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet",
            "fields": [
              {
                "name": "claim_key",
                "ordinal_position": 1
              },
              {
                "name": "policy_key",
                "ordinal_position": 2
              },
              {
                "name": "cause_code",
                "ordinal_position": 3
              },
              {
                "name": "reported_quarter",
                "ordinal_position": 4
              },
              {
                "name": "paid_amount",
                "ordinal_position": 5
              },
              {
                "name": "reserve_amount",
                "ordinal_position": 6
              },
              {
                "name": "incurred_amount",
                "ordinal_position": 7
              }
            ]
          }
        }
      },
      {
        "namespace": "harbour-mutual.sys-dw",
        "name": "fact_premium",
        "facets": {
          "schema": {
            "_producer": "https://cloud-data-architecture-lab.azurewebsites.net/tools/lineage-explorer",
            "_schemaURL": "https://openlineage.io/spec/facets/1-2-0/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet",
            "fields": [
              {
                "name": "policy_key",
                "ordinal_position": 1
              },
              {
                "name": "earned_premium",
                "ordinal_position": 2
              }
            ]
          }
        }
      }
    ],
    "outputs": [
      {
        "namespace": "harbour-mutual.sys-bi",
        "name": "Board semantic model",
        "facets": {
          "schema": {
            "_producer": "https://cloud-data-architecture-lab.azurewebsites.net/tools/lineage-explorer",
            "_schemaURL": "https://openlineage.io/spec/facets/1-2-0/SchemaDatasetFacet.json#/$defs/SchemaDatasetFacet",
            "fields": [
              {
                "name": "incurred_claims",
                "ordinal_position": 1
              },
              {
                "name": "earned_premium",
                "ordinal_position": 2
              },
              {
                "name": "loss_ratio",
                "ordinal_position": 3
              },
              {
                "name": "claims_by_cause",
                "ordinal_position": 4
              },
              {
                "name": "claims_reported",
                "ordinal_position": 5
              }
            ]
          },
          "columnLineage": {
            "_producer": "https://cloud-data-architecture-lab.azurewebsites.net/tools/lineage-explorer",
            "_schemaURL": "https://openlineage.io/spec/facets/1-2-0/ColumnLineageDatasetFacet.json#/$defs/ColumnLineageDatasetFacet",
            "fields": {
              "incurred_claims": {
                "inputFields": [
                  {
                    "namespace": "harbour-mutual.sys-dw",
                    "name": "fact_claim",
                    "field": "incurred_amount",
                    "transformations": [
                      {
                        "type": "DIRECT",
                        "subtype": "AGGREGATION",
                        "description": "sum",
                        "masking": false
                      }
                    ]
                  }
                ]
              },
              "earned_premium": {
                "inputFields": [
                  {
                    "namespace": "harbour-mutual.sys-dw",
                    "name": "fact_premium",
                    "field": "earned_premium",
                    "transformations": [
                      {
                        "type": "DIRECT",
                        "subtype": "AGGREGATION",
                        "description": "sum",
                        "masking": false
                      }
                    ]
                  }
                ]
              }
            }
          }
        }
      }
    ]
  }
]

Why it matters

Lineage turns trust from a promise into a path. When the combined loss ratio is questioned after the merger, Alex can show every hop from both companies' source columns to the board's figure, and which hops were declared by hand.

It also changes how change is managed: a release that touches a column ships with its impact list, and the owners of the reports it reaches are asked first. Quality incidents (chapter 16) are traced up the lineage to their root cause instead of being patched where they were noticed.

Where it goes wrong

  • Diagrams drawn by hand. A lineage picture drawn for an audit is wrong by the next release; collect it from the code and the runs.
  • Tables only. Table-level lineage says everything depends on everything; it cannot say what one column's change breaks.
  • Direct dependencies only. Ignoring join keys and filters misses half of what a change can break.
  • Gaps at the edges. Spreadsheets, manual uploads and external feeds are where lineage stops; record them by hand and mark them.
  • Lineage nobody uses. If change requests and incident reviews never consult it, it decays into a pretty picture.

Check yourself

Choose an answer to each question, then press Check.

1. A column is used only in a join condition. What kind of dependency does the output have on it?
2. Which question needs forward lineage?
3. In OpenLineage, what is a facet?
Answer every question first.

Sources

The works this page draws on, summarised in its own words rather than quoted. Read them for the full argument.

  • OpenLineage specification, version 2-0-2, and its facets (LF AI & Data Foundation)Jobs, runs and datasets, run events and their types, and the schema and column lineage facets with transformation types and subtypes.
  • W3C, PROV-O: The PROV Ontology (Recommendation, 2013)Provenance as entities, activities and agents.
  • DAMA International, DAMA-DMBOK, 2nd edition (2017)Lineage as metadata, and its use for impact analysis and root-cause analysis.

Practise it

The chapters that put this theory to work on Harbour Mutual and Kestrel:

The tools to try it in:

  • Lineage explorer · Trace a number back to its sources, or a change forward to everything it breaks.

Terms taught here: LineageImpact analysisOpenLineage

An unhandled error has occurred. Reload 🗙

Reconnecting…

Your connection to the Cloud Data Architecture Lab dropped, probably a Wi-Fi blip. Hold on while it reconnects.

The connection could not be restored. The page will reload in a few seconds.