Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>dbt airflow lineageNew to Visual Studio Code? Get it now.
dbt airflow lineage

dbt airflow lineage

tchandrap

|
11 installs
| (0) | Free
Know which reports and pipelines a dbt change breaks, and chat with your lineage through your AI agent (optional, local, read-only). dbt lineage graph with the Airflow pipelines that run and ingest each model.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

dbt airflow lineage

Know which reports and pipelines a dbt change will break, and ask your AI agent about it. A VS Code / Cursor extension that draws your dbt lineage, shows which Airflow pipelines run and ingest every model, and understands dbt selectors (tag:daily, model+, 1+model+1, --exclude …).

Impact and chat with your lineage, on a made-up shop project: click a model, press Impact to see the reports and critical models it reaches, then ask your AI agent the same question

Impact: what does my change break?

Click a model and press Impact. Only the paths to the reports and critical models it reaches are drawn (critical models amber, reports red), and a panel lists each one with its path and the Airflow pipelines, with schedules, that run it. You decide what counts as a report or a critical model: dbt exposures, tags, folders, files or any dbt selector.

The Impact panel: one report and two critical models reached from a model, each with its path and the pipelines that run it

Chat with your lineage

Turn on Ask AI (optional, off by default) and your editor's agent answers from your real graph instead of guessing:

  • "What breaks if I change dim_customer?"
  • "Which reports does stg_orders impact, and which pipelines run them?"
  • "Which pipeline runs fct_loan, and when?"
  • "What does tag:daily+ select?"

An agent asks the local lineage tool which reports a change impacts and gets the answer with paths, pipelines and schedules

It uses a bundled, local, read-only MCP server: no network, no API key. In Cursor it is set up for you; in VS Code it adds tools for the VS Code agent. It also connects to Claude Code, Claude Desktop, OpenAI Codex CLI or any MCP client (ChatGPT only connects to servers on the internet, so it cannot use a local one). The AI only receives model, report and pipeline names, never SQL or data.

Pictures use a made-up shop project. The chat window is an illustration of the editor's agent; the answer text comes from the extension itself.

What's new

0.2.1

  • One pipeline per DAG name: a DAG defined in a config file and in the file generated from it is shown once, with an "also defined in" link.
  • New settings dbtAirflow.pipelines.include / exclude to show only the DAGs you care about.
  • Save the graph as SVG or PNG with a transparent background (white boxes, black text) for slides and docs.
  • Fix: saving as PNG now works inside the editor.

0.2.0

  • Impact button: the reports and critical models a change reaches, with paths and the pipelines that run them.
  • Chat with your lineage through Ask AI (optional, off by default), backed by a local, read-only MCP server for Cursor, VS Code, Claude Code, Claude Desktop and Codex CLI.
  • Critical models next to reports, both defined in settings with exposures, tags, folders, files or dbt selectors.
  • Save the lineage as an image (SVG, PNG 3x or 6x), and progress bars for the long jobs.

See the full changelog.

What you get

  • Lineage graph from your target/manifest.json: drag nodes, pan, zoom, and click a node to center it and animate its upstream (blue) and downstream (orange) links.
  • Which pipelines run a model. The extension reads your Airflow DAG code, finds the dbt selections (dbt_selector=, dbt_exclude=, "selector", dbt run --select … --exclude …) and resolves them with a built-in implementation of the dbt selector language. Click the Airflow badge on a node to see every pipeline, its schedule, and the exact selector that matched.
  • Which pipeline ingests a table. DAGs that write to a BigQuery table (bq_dataset + bq_table, target_table, …) are matched to the dbt source or model by its real dataset and table name. They get a separate teal badge.
  • dbt selector search. A floating search box takes real dbt syntax: tag:finance,tag:daily, +orders, 1+orders+1, orders+1, path:models/marts. A + in the selector sets the upstream / downstream depth for you.
  • Filter by select, exclude, resource type, and model materialization (table, view, incremental, ephemeral, materialized view). Find in graph dims everything but the nodes you type.
  • Edit the YAML without leaving the graph. The model dialog shows description, tags, config, meta, tests, and columns from the model's properties file. Edit them and press Submit; only the lines you changed are written, so comments and formatting stay untouched.
  • Explore with +. The models at the edge of the graph have a + button that shows their downstream (right) or upstream (left) models, one level at a time, without changing your Upstream / Downstream numbers. The search box always shows the shortest dbt selector for what is on screen.
  • Save as an image. The download button saves the whole graph as an SVG (sharp at any zoom) or a high-resolution PNG (3x or 6x), optionally with a transparent background to drop onto a slide or page.
  • Clean pipeline list. The same DAG name defined in several files (a config file and the DAG generated from it) shows as one pipeline. dbtAirflow.pipelines.include / exclude choose which DAGs are shown, by name, file or folder with wildcards.
  • Optional Airflow. Lineage works on its own. Add a local DAG folder, or mirror DAGs from a Google Cloud Storage bucket, whenever you want pipelines.

A 40-second tour

A 40-second tour: lineage, Airflow pipelines, selector search, exploring with +, Impact, saving an image, Ask AI with a local MCP server, and the settings

A made-up shop project. The small boxes marked "illustration of the editor dialog" stand in for the editor's own dialogs, which a recording of the graph view cannot capture; their texts and the tool answers come from the extension itself.

Model dialog Airflow pipelines dialog
Ingestion pipeline Filter

(Screenshots use a small made-up shop project.)

Requirements

  • VS Code 1.85 or newer (also works in VS Code-compatible editors that can install a .vsix).
  • A dbt project with a compiled manifest: run dbt parse (or any dbt command that writes target/manifest.json) at least once. The extension can run it for you (dbt Airflow: Run dbt parse).
  • Optional: Airflow DAG code, either as a folder on your machine or in a Google Cloud Storage bucket. Reading a bucket needs the Google Cloud CLI (gcloud) and access to it.

Install

Option 1 — VS Code Marketplace

Open the Extensions view (Cmd/Ctrl+Shift+X), search for dbt airflow lineage, and click Install.

If you don't find it there yet, use Option 2.

Option 2 — From a .vsix file (works today)

  1. Download the latest dbt-airflow-lineage-<version>.vsix from the Releases page.
  2. In VS Code open the Extensions view, click the … menu at the top right, choose Install from VSIX…, and pick the file. Or from a terminal:
    code --install-extension dbt-airflow-lineage-<version>.vsix
    
  3. Reload the window (Developer: Reload Window).

Using several editors? On macOS the code command can point at a different editor (for example Cursor). Use Install from VSIX… inside the editor you want, or call that editor's own binary, e.g. "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code" --install-extension <file>.vsix.

Option 3 — Build from source

git clone https://github.com/tchandrap/dbt-airflow-lineage.git
cd dbt-airflow-lineage
npm ci
npm run build
npx vsce package          # creates dbt-airflow-lineage-<version>.vsix
code --install-extension dbt-airflow-lineage-*.vsix

Quick start

  1. Open your dbt project folder (the one with dbt_project.yml) in VS Code.
  2. Make sure target/manifest.json exists (dbt parse).
  3. Open any model .sql file. A CodeLens at the top says Lineage; click it, or run dbt Airflow: Show Lineage for Current Model. The graph opens as a tab in the bottom panel and then follows the model file you are editing.
  4. Click a node for its details, double-click to refocus and open its SQL.
  5. Optional: run dbt Airflow: Set up Airflow pipelines… (or press Set up Airflow at the top right of the graph) to connect your DAGs.

Connecting Airflow (optional)

The setup wizard offers three choices:

Choice What it does
Local folder Pick one or more folders that contain your DAG code (for example a checkout of your Airflow repo). Press Rescan DAGs after the code changes.
Google Cloud Storage Checks that gcloud is installed and you are signed in, lets you browse buckets and folders (or type gs://bucket/dags), tests that you can read the path, and mirrors the DAG code into a private cache folder. Press Sync DAGs to refresh. If your login has expired it offers to run gcloud auth login in a terminal, or switch account, and then retries.
Not now Lineage only.

Nothing is downloaded until you choose Google Cloud Storage and confirm. Only .py files are copied (the extension only reads DAG source code), and tests/ and __pycache__/ folders are skipped, so test data in a bucket is never downloaded; change this with dbtAirflow.dagsSyncExclude (Python regexes, matched against the path inside the bucket folder; no commas). The copy lives in the extension's own storage by default (or a folder you choose, in an airflow-dags-cache sub-folder that is the only place the extension ever deletes from).

Using the graph

Do this To get this
Click a node Center it, animate its links, open its details
Double-click a node Refocus the graph on it and open its SQL file
Click the Airflow badge Pipelines that run the model, with schedule and the matching selector
Click the teal badge Pipelines that ingest the table
Click a pipeline in that dialog Highlight everything it touches in the graph
Type in the floating search Show a dbt selection as its own graph (tag:a,tag:b, model+1, …)
Funnel button Select / exclude / type filter
Search icon at the top right Find a node by name or tag in the current graph
+ on an edge model Show its downstream (right) or upstream (left) models
Impact The critical models and reports a change reaches, with paths and pipelines
Download button (bottom right) Save the graph as SVG or PNG
Ask AI Set up the optional AI helper and ask about the lineage
Gear (top right) Open this extension's settings
Pencil in the model dialog Edit that section; Submit writes the YAML

Selector syntax follows dbt: a space is a union, a comma is an intersection, +model adds parents, model+ adds children, N+ limits depth, @model adds everything related, and Exclude removes nodes from the selection. While you type tag: the extension suggests your project's tags.

Settings

Search for "dbt Airflow" in Settings, or edit settings.json:

Setting Default Meaning
dbtAirflow.projectDir auto-detect Folder with dbt_project.yml.
dbtAirflow.manifestPath target/manifest.json Manifest path relative to the project.
dbtAirflow.airflowSource auto none, local, gcs, or auto (local if airflowPaths is set).
dbtAirflow.airflowPaths [] DAG folders for the local source.
dbtAirflow.dagsBucket empty gs://bucket/folder for the GCS source.
dbtAirflow.dagsDownloadDir extension storage Where to keep the downloaded DAGs.
dbtAirflow.dagsSyncExclude only .py, no tests/ Regexes for bucket objects not to download (see below).
dbtAirflow.upstreamDepth / downstreamDepth 2 / 2 Levels shown around the focused model.
dbtAirflow.dbtCommand dbt Command used by Run dbt parse.
dbtAirflow.reports.include / exclude [] What counts as a report. Combined entries: exposures, tag:report, folder:reporting, file:rpt_pnl.sql, path:models/marts, or any dbt selector.
dbtAirflow.critical.include / exclude [] Which models are critical, written the same way (for example tag:critical).
dbtAirflow.pipelines.include / exclude [] Show only some DAGs (or hide some), by DAG name, file or folder, with wildcards (for example ["my_dag"]).
dbtAirflow.ai.enabled false Optional AI (see above). The Ask AI button asks before turning it on.

Every setting has a longer description with examples in the Settings screen. Example:

"dbtAirflow.reports.include": ["exposures", "tag:report", "folder:reporting", "file:rpt_pnl.sql"],
"dbtAirflow.critical.include": ["tag:critical", "folder:regulatory_reports"]

Commands

  • dbt Airflow: Show Lineage for Current Model
  • dbt Airflow: Set up Airflow pipelines…
  • dbt Airflow: Sync Airflow DAGs from GCS
  • dbt Airflow: Run dbt parse
  • dbt Airflow: Refresh (re-read manifest and DAGs)
  • dbt Airflow: Choose what counts as a report… and Choose which models are critical…
  • dbt Airflow: Save the lineage as an image (SVG or PNG)…
  • dbt Airflow: Ask AI about this model (impacted reports) (shortcut Cmd+Alt+A)
  • dbt Airflow: Connect an AI tool to the lineage (Claude, Codex, other)…

How it works

  • Lineage comes from the parent_map in target/manifest.json. A background process slims even very large manifests (hundreds of MB) into a small cached graph, so opening and navigating is fast. It refreshes when the manifest changes.
  • Selectors are resolved by a TypeScript implementation of the dbt selection language, run against that graph.
  • Airflow is read as source text with a small tokenizer: no Airflow install and no DAG imports. Selectors built at runtime (f-strings, values read from config) are shown as dynamic and are not resolved.
  • YAML edits use a parser that reports source positions, then splice only the changed lines into the file.
  • No data leaves your machine, except the optional gcloud calls you trigger yourself, which use your own credentials. There is no telemetry.

Limitations

  • Lineage is only as fresh as your last dbt parse.
  • Model-level lineage only; there is no column-level lineage.
  • Selector methods that need run state (state:, result:, test_name:, version:) are not supported and show a warning.
  • Ingestion is found from explicit write keys in DAG code (bq_dataset + bq_table, target_table, destination_table, …). Tables loaded by other systems (Kafka connectors, Dataflow, Terraform, …) are not detected.
  • A model that inherits its tests or columns through YAML merge keys (<<: *anchor) is readable, but adding tests to inherited entries is refused so the inherited ones are not silently overridden.
  • The selector engine is a re-implementation, not dbt's own code. If a result surprises you, compare with dbt ls --select ….

Troubleshooting

Problem Try
"manifest.json not found" Run dbt parse in the dbt project, or set dbtAirflow.projectDir / manifestPath.
Nothing happens after installing Reload the window; open the dbt project folder (the one containing dbt_project.yml).
No pipelines shown Run Set up Airflow pipelines…; check the DAG folder really contains the DAG .py files.
"Reauthentication failed" when syncing Choose Sign in with gcloud in the dialog, or run gcloud auth login yourself.
"gcloud crashed (TypeError …)" when syncing That is a bug inside gcloud that hides the real error. The extension retries with gsutil; also try gcloud components update, and point the path at the DAGs folder rather than the bucket root.
A model shows no YAML It is not declared in any properties .yml, or it belongs to an installed package.
Details of the last operation View → Output → dbt airflow lineage.

Development

npm ci
npm run build      # bundle extension + webview into dist/
npm test           # unit tests (selector engine, DAG parser, YAML editor, payloads, gcloud helpers)
npm run watch

Press F5 in VS Code to launch an Extension Development Host. The code is organized as:

Path Purpose
src/extension.ts Activation, views, commands, Airflow setup wizard
src/selector.ts dbt selector engine
src/airflow.ts DAG tokenizer and selector / ingestion detection
src/index.ts, src/payload.ts Joins graph and pipelines; builds the view model
src/meta.ts Surgical YAML reader / editor
src/gcloud.ts gcloud helpers and error classification
src/slimWorker.ts Manifest → slim graph (runs in a child process)
src/webview/ The graph UI

Releases: tag a commit vX.Y.Z and push the tag; the Release workflow builds the .vsix, attaches it to a GitHub release, and publishes to the Marketplace / Open VSX when the VSCE_PAT / OVSX_PAT repository secrets exist.

Issues and pull requests are welcome.

License and notices

MIT. This project is not affiliated with or endorsed by dbt Labs or the Apache Software Foundation. "dbt" and the dbt logo are trademarks of dbt Labs, Inc.; "Apache Airflow" and its logo are trademarks of the Apache Software Foundation. The two logos appear only to show which tools the extension works with: in the extension icon and on pipeline badges. The Airflow logo comes from the dashboard-icons collection (Apache-2.0) and the dbt mark from Simple Icons (CC0); the marks themselves remain their owners' property.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft