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 110/ 160
06. Data Transformation (dbt) & Workflow Orchestration

dbt Documentation, Lineage Graphs (DAG) & Exposures

Publish docs, lineage DAGs, and exposures so consumers understand upstream dependencies.

BeginnerDocs · Lineage · Exposures3 quiz questions
Practice Generative AI Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

In plain words

Source, model grain, fields, and owner. Next, manifest records ref/source edges. Finally, graph/state selection, incident tracing, and deprecation.

Think of it like…

Lineage is the electrical wiring diagram; exposures are the appliances labeled with an owner and room, showing exactly which circuit a breaker change affects.

Where you’ve seen it

exposure: revenue_dashboard, type: dashboard, owner: BI Platform, depends_on: [ref('fct_revenue')] links the metric's consumers to the model graph and appears in documented lineage.

Words you’ll hear

Docs
Generated web documentation and graph based on model YAML, source, test, metric, and dependency metadata.
Lineage
A directed acyclic graph of data nodes used by selection, visual lineage, and dependency execution.
Exposures
A declared downstream consumer attached to model refs with owner, type, URL, and maturity.
Operational boundary
A beautiful DAG generated from stale docs still gives incorrect dependency meaning, and exposures without owners cannot prioritize a changed source's real blast radius. Write descriptions beside owned models, generate docs in CI, add exposure URLs/owners/maturity, and use graph selection from state: or manifest diff for impact-aware tests and deploys.

Visual diagram

Loading interactive diagram

Theory & deep dive

Docs: the working mechanism

dbt docs publish descriptions and a lineage DAG from manifest metadata; exposures register downstream dashboards, apps, or ML jobs as graph consumers with maturity and owner information.

Source, model grain, fields, and owner. Manifest records ref/source edges, then downstream tool identity and maturity; this exposes the state governed by Exposures.

dbt Documentation, Lineage Graphs & Exposures in one concrete design

exposure: revenue_dashboard, type: dashboard, owner: BI Platform, depends_on: [ref('fct_revenue')] links the metric's consumers to the model graph and appears in documented lineage.

Key takeaway: dbt docs publish descriptions and a lineage DAG from manifest metadata

dbt Documentation, Lineage Graphs & Exposures: failure mode and production response

A beautiful DAG generated from stale docs still gives incorrect dependency meaning, and exposures without owners cannot prioritize a changed source's real blast radius.

Write descriptions beside owned models, generate docs in CI, add exposure URLs/owners/maturity, and use graph selection from state: or manifest diff for impact-aware tests and deploys. Track Coverage as "owned source/models/exposures with complete descriptions", and make Impact set visible to the dataset owner.

Key takeaway: Write descriptions beside owned models, generate docs in CI, add exposure URLs/owners/maturity, and use graph selection from state: or manifest diff for impact-aware tests and deploys.

How it works, step by step

Step 1 of 4
Docs

1. Describe

Source, model grain, fields, and owner. dbt docs publish descriptions and a lineage DAG from manifest metadata; exposures register downstream dashboards, apps, or ML jobs as graph consumers with maturity and owner information.

source, model grain, fields, and owner
Key numbers at this step
Coverage
owned source/models/exposures with complete descriptions
Lineage
A directed acyclic graph of data nodes used by selection, visual lineage, and dependency execution.

When to use it & trade-offs

What it is

dbt docs publish descriptions and a lineage DAG from manifest metadata; exposures register downstream dashboards, apps, or ML jobs as graph consumers with maturity and owner information. exposure: revenue_dashboard, type: dashboard, owner: BI Platform, depends_on: [ref('fct_revenue')] links the metric's consumers to the model graph and appears in documented lineage.

Why it matters: A beautiful DAG generated from stale docs still gives incorrect dependency meaning, and exposures without owners cannot prioritize a changed source's real blast radius. Write descriptions beside owned models, generate docs in CI, add exposure URLs/owners/maturity, and use graph selection from state: or manifest diff for impact-aware tests and deploys.

When to reach for it

  • Publish docs, lineage DAGs, and exposures so consumers understand upstream dependencies.
  • Choose Docs because it provides this capability: Generated web documentation and graph based on model YAML, source, test, metric, and dependency metadata.
  • Keep evidence for Coverage at "owned source/models/exposures with complete descriptions" so the last production stage-Apply impact - graph/state selection, incident tracing, and deprecation-remains testable.

When to avoid or be careful

  • A beautiful DAG generated from stale docs still gives incorrect dependency meaning, and exposures without owners cannot prioritize a changed source's real blast radius.
  • Do not conflate Lineage with Docs. The second concept contributes different behavior: A directed acyclic graph of data nodes used by selection, visual lineage, and dependency execution.
  • Release only after this guardrail is in place: Write descriptions beside owned models, generate docs in CI, add exposure URLs/owners/maturity, and use graph selection from state: or manifest diff for impact-aware tests and deploys.

Docs / Lineage / Exposures - roles, limits, and operating cost

Docs
Best for: Generated web documentation and graph based on model YAML, source, test, metric, and dependency metadata.

Strengths: Generated web documentation and graph based on model YAML, source, test, metric, and dependency metadata. dbt docs publish descriptions and a lineage DAG from manifest metadata.

Watch out: A beautiful DAG generated from stale docs still gives incorrect dependency meaning, and exposures without owners cannot prioritize a changed source's real blast radius.

Lineage
Best for: A directed acyclic graph of data nodes used by selection, visual lineage, and dependency execution.

Strengths: A directed acyclic graph of data nodes used by selection, visual lineage, and dependency execution. In this workflow it supports: Expose - downstream tool identity and maturity.

Watch out: The operating cost is real: downstream exposures reachable from a changed node.

Exposures
Best for: A declared downstream consumer attached to model refs with owner, type, URL, and maturity.

Strengths: A declared downstream consumer attached to model refs with owner, type, URL, and maturity. Its output can be checked with Manifest freshness.

Watch out: Operating guardrail: Write descriptions beside owned models, generate docs in CI, add exposure URLs/owners/maturity, and use graph selection from state: or manifest diff for impact-aware tests and deploys.

Interview signals & numbers to know

When this topic comes up

  • “Where is the failure boundary for Docs, and how would Coverage reveal it?”
  • “Why is Lineage distinct from this behavior: a declared downstream consumer attached to model refs with owner, type, URL, and maturity?”
  • Production clue: A beautiful DAG generated from stale docs still gives incorrect dependency meaning, and exposures without owners cannot prioritize a changed source's real blast radius.
  • Design probe: Write descriptions beside owned models, generate docs in CI, add exposure URLs/owners/maturity, and use graph selection from state: or manifest diff for impact-aware tests and deploys.

Benchmarks & rules of thumb

Coverage -
owned source/models/exposures with complete descriptions
Impact set -
downstream exposures reachable from a changed node
Manifest freshness -
docs generated from the deployed commit

Common mistakes & follow-ups

Common interview mistakes

  • A beautiful DAG generated from stale docs still gives incorrect dependency meaning, and exposures without owners cannot prioritize a changed source's real blast radius.
  • Reporting success from a job exit code without checking Coverage and Impact set.
  • Treating this example as complete without replay, rollback, or access boundaries: exposure: revenue_dashboard, type: dashboard, owner: BI Platform, depends_on: [ref('fct_revenue')] links the metric's consumers to the model graph and appears in documented lineage.

Likely interviewer follow-ups

  • How would you prove this contract instead of only checking that the command ran: Generated web documentation and graph based on model YAML, source, test, metric, and dependency metadata.
  • What does the recovery plan do when this occurs? A beautiful DAG generated from stale docs still gives incorrect dependency meaning, and exposures without owners cannot prioritize a changed source's real blast radius.
  • When is Docs insufficient for Impact set, and what does adding Lineage cost in Coverage?
Interview tip: Lead with the data path and failure boundary: dbt docs publish descriptions and a lineage DAG from manifest metadata; exposures register downstream dashboards, apps, or ML jobs as graph consumers with maturity and owner information. Then make the answer operational: Write descriptions beside owned models, generate docs in CI, add exposure URLs/owners/maturity, and use graph selection from state: or manifest diff for impact-aware tests and deploys.

Knowledge check

Loading quiz

Put it into practice

Practice related interview Q&A

Apply dbt Documentation, Lineage Graphs (DAG) & Exposures with data engineer interview Q&A and hands-on practice.

Open Data Engineer Q&A →Machine Learning Q&A
Previous topic
Built-in & Custom Data Tests, Sources & Freshness Checks
Next topic
Workflow Orchestration Concepts (DAGs, Dependencies, Backfills, Idempotency)