Interview's MateData Engineer
Interview's Mate

Data Engineer

SQL · Spark · Lakehouse · Streaming

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Data Engineer topics
Lesson 145/ 160
08. Data Quality, Governance, Security & AI Infrastructure

Data Lineage Tracking (OpenLineage, Marquez)

Capture job and dataset lineage with OpenLineage/Marquez for impact analysis and debugging.

IntermediateOpenLineage · Marquez · Impact3 quiz questions
Practice Generative AI Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

Stable namespace, job, dataset, and version. Next, run start, abort, complete, and failure events. Finally, impact graph, runtime history, and broken emitter alert.

Think of it like…

Lineage is a shipping manifest that records not only which boxes moved, but which truck/run carried them, the route, and which store shelves depend on each box.

Where you’ve seen it

A dbt/Airflow run sends OpenLineage events for job_namespace=finance, input raw.orders, output marts.revenue@commit, and an error facet; Marquez links the exact run to downstream dashboard exposures.

Words you’ll hear

OpenLineage
A standard event model/facets for capturing data job runs, inputs, outputs, and processing metadata.
Marquez
A lineage metadata server and UI that ingests OpenLineage events and builds job/dataset graphs.
Impact
The downstream and column impact of a changed or failed source/job/model, not merely a list of related objects.
Operational boundary
Lineage captured only at table names misses column-level PII and partition versions, event emitters can fail open silently, and a live graph with no run identity cannot distinguish a historical failed job from the current published artifact. Instrument job starts/completes/failures with stable namespace/name, dataset facets/schema/columns, attach run/partition/build IDs, monitor emitter delivery, and connect incident and catalog views to production event retention.

Visual diagram

Loading interactive diagram

Theory & deep dive

OpenLineage: the working mechanism

OpenLineage emits standard RunEvent and job/dataset facets from tools, and Marquez stores/displays those events so teams can trace inputs, transformations, outputs, ownership, and failures.

Stable namespace, job, dataset, and version. Run start, abort, complete, and failure events, then schema, column, code, source, and ownership facets; this exposes the state governed by Impact.

Data Lineage Tracking in one concrete design

A dbt/Airflow run sends OpenLineage events for job_namespace=finance, input raw.orders, output marts.revenue@commit, and an error facet; Marquez links the exact run to downstream dashboard exposures.

Key takeaway: OpenLineage emits standard RunEvent and job/dataset facets from tools, and Marquez stores/displays those events so teams can trace inputs, transformations, outputs, ownership, and failures

Data Lineage Tracking: failure mode and production response

Lineage captured only at table names misses column-level PII and partition versions, event emitters can fail open silently, and a live graph with no run identity cannot distinguish a historical failed job from the current published artifact.

Instrument job starts/completes/failures with stable namespace/name, dataset facets/schema/columns, attach run/partition/build IDs, monitor emitter delivery, and connect incident and catalog views to production event retention. Track Emitter delivery as "events accepted versus runs completed", and make Run identity visible to the dataset owner.

Key takeaway: Instrument job starts/completes/failures with stable namespace/name, dataset facets/schema/columns, attach run/partition/build IDs, monitor emitter delivery, and connect incident and catalog views to production event retention.

How it works, step by step

Step 1 of 4
OpenLineage

1. Define identity

Stable namespace, job, dataset, and version. OpenLineage emits standard RunEvent and job/dataset facets from tools, and Marquez stores/displays those events so teams can trace inputs, transformations, outputs, ownership, and failures.

stable namespace, job, dataset, and version
Key numbers at this step
Emitter delivery
events accepted versus runs completed
Marquez
A lineage metadata server and UI that ingests OpenLineage events and builds job/dataset graphs.

When to use it & trade-offs

What it is

OpenLineage emits standard RunEvent and job/dataset facets from tools, and Marquez stores/displays those events so teams can trace inputs, transformations, outputs, ownership, and failures. A dbt/Airflow run sends OpenLineage events for job_namespace=finance, input raw.orders, output marts.revenue@commit, and an error facet; Marquez links the exact run to downstream dashboard exposures.

Why it matters: Lineage captured only at table names misses column-level PII and partition versions, event emitters can fail open silently, and a live graph with no run identity cannot distinguish a historical failed job from the current published artifact. Instrument job starts/completes/failures with stable namespace/name, dataset facets/schema/columns, attach run/partition/build IDs, monitor emitter delivery, and connect incident and catalog views to production event retention.

When to reach for it

  • Capture job and dataset lineage with OpenLineage/Marquez for impact analysis and debugging.
  • Choose OpenLineage because it provides this capability: A standard event model/facets for capturing data job runs, inputs, outputs, and processing metadata.
  • Keep evidence for Emitter delivery at "events accepted versus runs completed" so the last production stage-Query/store - impact graph, runtime history, and broken emitter alert-remains testable.

When to avoid or be careful

  • Lineage captured only at table names misses column-level PII and partition versions, event emitters can fail open silently, and a live graph with no run identity cannot distinguish a historical failed job from the current published artifact.
  • Do not conflate Marquez with OpenLineage. The second concept contributes different behavior: A lineage metadata server and UI that ingests OpenLineage events and builds job/dataset graphs.
  • Release only after this guardrail is in place: Instrument job starts/completes/failures with stable namespace/name, dataset facets/schema/columns, attach run/partition/build IDs, monitor emitter delivery, and connect incident and catalog views to production event retention.

OpenLineage / Marquez / Impact - roles, limits, and operating cost

OpenLineage
Best for: A standard event model/facets for capturing data job runs, inputs, outputs, and processing metadata.

Strengths: A standard event model/facets for capturing data job runs, inputs, outputs, and processing metadata. OpenLineage emits standard RunEvent and job/dataset facets from tools, and Marquez stores/displays those events so teams can trace inputs, transformations, outputs, ownership, and failures.

Watch out: Lineage captured only at table names misses column-level PII and partition versions, event emitters can fail open silently, and a live graph with no run identity cannot distinguish a historical failed job from the current published artifact.

Marquez
Best for: A lineage metadata server and UI that ingests OpenLineage events and builds job/dataset graphs.

Strengths: A lineage metadata server and UI that ingests OpenLineage events and builds job/dataset graphs. In this workflow it supports: Enrich - schema, column, code, source, and ownership facets.

Watch out: The operating cost is real: one lineage node per logical interval/execution.

Impact
Best for: The downstream and column impact of a changed or failed source/job/model, not merely a list of related objects.

Strengths: The downstream and column impact of a changed or failed source/job/model, not merely a list of related objects. Its output can be checked with Lineage coverage.

Watch out: Operating guardrail: Instrument job starts/completes/failures with stable namespace/name, dataset facets/schema/columns, attach run/partition/build IDs, monitor emitter delivery, and connect incident and catalog views to production event retention.

Interview signals & numbers to know

When this topic comes up

  • “Where is the failure boundary for OpenLineage, and how would Emitter delivery reveal it?”
  • “Why is Marquez distinct from this behavior: the downstream and column impact of a changed or failed source/job/model, not merely a list of related objects?”
  • Production clue: Lineage captured only at table names misses column-level PII and partition versions, event emitters can fail open silently, and a live graph with no run identity cannot distinguish a historical failed job from the current published artifact.
  • Design probe: Instrument job starts/completes/failures with stable namespace/name, dataset facets/schema/columns, attach run/partition/build IDs, monitor emitter delivery, and connect incident and catalog views to production event retention.

Benchmarks & rules of thumb

Emitter delivery -
events accepted versus runs completed
Run identity -
one lineage node per logical interval/execution
Lineage coverage -
critical sources and outputs with current events and owners

Common mistakes & follow-ups

Common interview mistakes

  • Lineage captured only at table names misses column-level PII and partition versions, event emitters can fail open silently, and a live graph with no run identity cannot distinguish a historical failed job from the current published artifact.
  • Reporting success from a job exit code without checking Emitter delivery and Run identity.
  • Treating this example as complete without replay, rollback, or access boundaries: A dbt/Airflow run sends OpenLineage events for job_namespace=finance, input raw.orders, output marts.revenue@commit, and an error facet; Marquez links the exact run to downstream dashboard exposures.

Likely interviewer follow-ups

  • How would you prove this contract instead of only checking that the command ran: A standard event model/facets for capturing data job runs, inputs, outputs, and processing metadata.
  • What does the recovery plan do when this occurs? Lineage captured only at table names misses column-level PII and partition versions, event emitters can fail open silently, and a live graph with no run identity cannot distinguish a historical failed job from the current published artifact.
  • When is OpenLineage insufficient for Run identity, and what does adding Marquez cost in Emitter delivery?
Interview tip: Lead with the data path and failure boundary: OpenLineage emits standard RunEvent and job/dataset facets from tools, and Marquez stores/displays those events so teams can trace inputs, transformations, outputs, ownership, and failures. Then make the answer operational: Instrument job starts/completes/failures with stable namespace/name, dataset facets/schema/columns, attach run/partition/build IDs, monitor emitter delivery, and connect incident and catalog views to production event retention.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply Data Lineage Tracking (OpenLineage, Marquez) with data engineer interview Q&A and hands-on practice.

Open Data Engineer Q&A →Machine Learning Q&A
Previous topic
Data Observability Pillars (Freshness, Volume, Schema, Distribution, Lineage)
Next topic
Data Catalogs & Discovery Platforms (DataHub, OpenMetadata, Amundsen)