Stackbook Logo
observabilityemerging · medium operational burden

Data Lineage

Also known as: data-provenance, column-level-lineage

Intent

Record how data flows and transforms from sources to outputs to enable impact analysis, debugging and compliance.

Problem

When a dashboard number looks wrong or a column must change, nobody knows which upstream jobs feed it or which downstream assets depend on it. Audits ask where personal data flows and answers take weeks.

Forces

  • •Capturing lineage automatically versus hand-maintained docs
  • •Table-level versus column-level granularity
  • •Many heterogeneous tools emit different metadata
  • •Lineage must stay current as pipelines change

Solution

Overview

Data lineage is a map of where data comes from and where it goes. Nodes are datasets, jobs and runs; edges show reads and writes. It answers two questions: what feeds this table, and what breaks if I change it.

How it works

Each job run emits an event naming its inputs and outputs. A collector merges events into a graph.

raw.orders --\
              job: build_orders_clean --> silver.orders --> job: daily_revenue --> gold.revenue --> dashboard
raw.refunds -/

An OpenLineage-style event contains the job name, run id, state, input datasets and output datasets, plus optional facets such as schema and row counts. Column-level lineage comes from parsing SQL to map output columns to source columns, which supports tracing a tagged personal data column to every downstream use.

Typical uses: before dropping a column, query all downstream consumers; during an incident, walk upstream from the broken table to the first failed or late run; for compliance, list every dataset derived from a regulated source and verify access controls.

Pitfalls

  • Partial coverage: a script that writes outside instrumented systems creates blind spots. Track coverage and treat unknown edges as a risk.
  • Treating lineage as documentation written by hand, which decays. Capture automatically at run time.
  • Over-trusting column-level results from SQL parsing when queries use dynamic SQL, UDFs or select star.
  • Ignoring run-level context: static graphs show possible flows, runs show what actually happened.
  • Exposing lineage without access control may reveal sensitive dataset names.

Key takeaways

  • Emit lineage from the tools, not from people.
  • Use it for impact analysis, debugging and privacy audits.
  • Combine static dependencies with per-run events.
  • Measure coverage so gaps are visible.

✓ When to Use

  • •Many pipelines and teams with unclear dependencies
  • •Compliance requires tracing sensitive data
  • •Frequent incidents needing root-cause across jobs

✗ When Not to Use

  • •A handful of pipelines documented in one repo
  • •No ability to instrument the tools in use
  • •Metadata effort would exceed value for small teams

Pros

  • +Fast impact analysis before changes
  • +Quicker root-cause debugging
  • +Supports audit and privacy compliance

Cons

  • −Coverage gaps for untracked tools
  • −Column-level parsing is imperfect
  • −Another metadata system to run

Cost Profile

Infrastructure

Low - metadata storage

Operational

Medium - integrations and upkeep

Cognitive

Medium - graph and granularity concepts

Failure Modes

  • Lineage graph misses jobs that run outside instrumented tools

  • Stale lineage misleads impact analysis

  • Dynamic SQL hides column dependencies

Real-World Examples

Alternatives

    Related Patterns

      Competency Domains

      data state