dbt-lineage
概览
作者提供的说明(英文原文)
dbt model and column lineage, downstream impact and test proposals; no warehouse or dbt compile
PopNx MCP 的三大支柱
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
- 用户评价i暂无评价评价功能将在后续阶段与账户功能一起开放
- 我们的基础检查i1 项中通过 1 项依据公开信息检查;尚未扫描代码
- 使用情况i非常新★ –
它能帮你做什么
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
- 连接方式: 在你的电脑上运行
- 传输方式: stdio
- 分类: 数据库与数据集
安装
选择你使用的 AI 应用,然后复制设置。
安装之前
- 基础检查:1 项中通过 1 项
- 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
- 注册中心没有列出需要填写的密钥。
作者没有在注册中心列出安装信息。请查看下方作者的 README。
它能做什么
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
基础检查i
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日
- ✓ 通过
作者与仓库一致
注册名称已通过 GitHub 账户 sipemu 验证,该账户拥有此仓库
- … 尚未检查
仍在维护
我们还没有从 GitHub 读取这个仓库
- … 尚未检查
有许可证
我们还没有从 GitHub 读取这个仓库
- – 不适用
端点有响应
它在你的电脑上运行,没有互联网端点
- – 不适用
使用 OAuth 登录
在你的电脑上运行,改用本地设置
- … 尚未检查
工具描述中没有隐藏指令
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与“数据库与数据集”中的其他服务器比较i
- 星标数多于此分类中其他 1144 个服务器的 0%
- 发布到注册中心的时间比此分类中其他 1144 个服务器的 98% 更新
- 基础检查结果等于或优于此分类中其他 1144 个服务器的 100%
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
常见问题
dbt-lineage 安全吗?
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
它需要哪些密钥或代码?
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在我的电脑上运行还是在云端?
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
它还在维护吗?
GitHub 仓库最后更新于–,最新版本(0.19.0)于昨天进入注册中心。
哪些应用可以使用它?
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Rust。
有什么可以替代它?
同一分类中有:Supabase, MongoDB MCP Server, Elasticsearch MCP Server
替代选择
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:↓ 每周下载量i★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
作者的 README
打开 README
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
dbt-lineage
Every dbt PR gets one comment: what changed, which downstream columns and dashboards it breaks, and what to rebuild. Live demo →
See what a dbt change breaks — downstream models, columns, dashboards and contracts — before it ships. dbt-lineage parses your project directly (no warehouse, no Python, no dbt compile) and puts lineage and impact wherever you work.
Use it where you work
| Where | What you get | Get it |
|---|---|---|
| Pull requests (GitHub) | One sticky comment per PR: lineage diff, column impact, affected dashboards, breaking changes, rebuild selector; inline lint annotations | uses: sipemu/dbt-lineage-viewer@v0 · live demo |
| GitLab · Bitbucket · Azure DevOps | The same report as an MR/PR comment, plus Code Quality / Code Insights / build warnings | docs/CI.md |
| VS Code, Cursor, VSCodium | *Show impact of my changes* panel, hover and go-to-definition on ref()/source(), lint diagnostics; binary bundled | VS Code Marketplace · Open VSX |
| Terminal | Lineage, impact, diff, plan, lint, coverage, interactive TUI | pip install dbt-lineage-cli · brew install sipemu/tap/dbt-lineage · cargo binstall dbt-lineage |
| Browser | Static lineage site with column lineage for GitHub/GitLab Pages | dbt-lineage site · demo site |
| BI tools | Dashboards from Metabase, Tableau, Looker, Power BI, Superset and anofox-visualization as dbt exposures | dbt-lineage exposures |
| AI agents | MCP server with lineage, impact and column-lineage tools | dbt-lineage mcp |
| Neovim, Helix | Language server (dbt-lineage lsp) | docs/EDITORS.md |
Features
Source modes
- Direct SQL parsing — extracts
ref()andsource()via a Jinja-aware lexer, nodbt compileneeded - Manifest support — optionally read
manifest.jsonfor column metadata, materializations, and full graph fidelity - Jinja-aware dependencies — finds
ref()/source()anywhere in Jinja ({% set x = ref('a') %},dbt_utils.star(from=ref('a')), versioned refs), follows macros that reference models (project and installed packages, includingadapter.dispatch), and expands loops over literal lists. Check it on your project withverify; see Accuracy - Parallel parsing + on-disk cache —
rayon-parallelized parsing and a content-hash cache at.dbt-lineage/cache.bin; warm runs are near-instant on large monorepos. Bypass with--no-cache. Seedocs/CACHE.md
Analysis subcommands
- `summary` — one-shot project overview (counts, tags, top fan-out, orphans)
- `impact ` — downstream impact with severity scoring (Critical / High / Medium / Low)
- `diff --base ` — compares lineage between git refs, showing added / removed / modified nodes and edges
- `plan --base ` — emits a dbt selector for the minimal rebuild set; pipes into
dbt run -s "$(…)" - `coverage` — tests-per-model + per-column map; text, JSON, or SARIF (PR annotations)
- `lint` — flags unused sources, undefined refs, dead-end models, missing descriptions, models with only unresolved upstream, circular refs
- `site` — static lineage site (search, per-node pages with lineage diagram, column-level lineage, SQL) for GitHub/GitLab Pages
- `docs` — generates per-model Markdown with description, upstream / downstream, columns, embedded Mermaid lineage
- `perf` — joins
run_results.jsonwith the DAG: slowest models, critical paths - `verify` — compares parsed lineage with dbt's
manifest.jsonand lists every dependency that differs; exits non-zero when parsing missed one - `check-manifest` — flags drift between
manifest.jsonand current SQL files using dbt's recorded SHA-256 (mtime fallback); exits non-zero for CI gating
Column-level lineage
- AST-backed analyzer via
sqlparser(0.6.0+) handles aliases, JOINs, aggregations, and CTEs with proper transformation classification (Direct,Aliased,Derived) - Regex-based analyzer remains as a fallback for dialect-specific syntax sqlparser can't yet parse
MCP server (AI-agent integration)
- `dbt-lineage mcp` — stdio Model Context Protocol server. See
docs/MCP.mdfor setup and cookbook. - 10 tools:
summary,search_models,lineage,impact,get_model_details,read_model_sql,column_upstream,column_downstream,lineage_bundle,propose_test - Resources: model SQL, focused lineage diagrams, source/exposure metadata, always-fresh summary
- Prompts:
review-impact,propose-tests,explain-column,find-bottleneck,document-model,onboard-project
Output
- 6 formats — ASCII, Graphviz DOT, JSON, Mermaid, self-contained SVG, interactive HTML (pan / zoom / search)
- Mermaid niceties —
--show-columnsinlines column names in node labels;--group-by directoryemits Mermaid subgraphs - Graph collapse —
--collapse/--collapse=focaldrops intermediate nodes and labels transitive paths with(via N)edges - Structured errors —
--error-format jsonwrites{level, what, why, hint}to stderr for deterministic agent / CI consumers
Editor integration
- `dbt-lineage lsp` — language server: hover and go-to-definition on
ref()/source(), lineage code lens per model, lint diagnostics. VS Code extension on the Marketplace and Open VSX (code --install-extension sipemu.dbt-lineage-viewer); Neovim and Helix setup indocs/EDITORS.md
Interactive TUI
- Navigate, search, and explore lineage in a terminal UI (
ratatui) with Unicode box-drawing nodes, orthogonal edge routing, and full mouse support - Run dbt from TUI — execute
dbt run/dbt teston selected models with scope control (+upstream,downstream+,+all+) via keyboard menu or right-click context menu - Run status tracking — color-coded nodes show success (green), error (red), outdated (yellow), or never-run (default)
- Path highlighting — trace upstream / downstream paths with impact analysis
Filtering and node types
- Selector expressions —
-s tag:finance,path:martsfilters by tag, path, or model name (comma-separated) - Node-type filters —
--include-tests,--include-seeds,--include-snapshots,--include-exposures - Node-type support — models, sources, seeds, snapshots, tests, exposures
Accuracy
dbt-lineage reads dependencies from your SQL without running dbt, so it can miss dependencies that only exist once Jinja is rendered. dbt-lineage verify measures that on your own project against a manifest.json from dbt parse.
Results on public dbt projects (manifests from dbt parse, dbt Core 1.12 with the DuckDB adapter; packages measured through their integration_tests project). scripts/accuracy/run.py produces this table, and CI runs it on every parser change and weekly, failing on any missed dependency:
| Project | Models compared | Dependencies found | Extra, not in manifest |
|---|---|---|---|
jaffle-shop 5beb145 | 13 | 17 / 17 | 0 |
tuva 465927a | 555 | 1,560 / 1,560 | 5 |
cal-itp data-infra 3801da6 | 625 | 1,192 / 1,192 | 0 |
Fivetran dbt_hubspot 5f00935 | 176 | 280 / 280 | 18 |
Fivetran dbt_jira 1a9f8b4 | 61 | 108 / 108 | 0 |
Fivetran dbt_shopify a033782 | 240 | 414 / 414 | 25 |
Fivetran dbt_quickbooks 0b9da0d | 114 | 210 / 210 | 35 |
Fivetran dbt_netsuite e3c026e | 106 | 183 / 183 | 7 |
Fivetran dbt_zendesk c5f2cfa | 88 | 162 / 162 | 6 |
Fivetran dbt_stripe 7f5d6ae | 65 | 117 / 117 | 2 |
Fivetran dbt_salesforce 8f9e9c0 | 24 | 42 / 42 | 1 |
Every extra dependency sits in a Jinja branch switched off by the project's current vars ({% if var('hubspot_property_enabled') %}). dbt records only the branches it renders; dbt-lineage keeps them so impact analysis doesn't miss a dependency that a var can switch on.
What parsing can't follow: refs whose names are computed at render time from variables or macro return values. verify lists those, and any command reads --manifest for exact lineage when you need it.
Column lineage
Column impact ("removing stg_orders.customer_id breaks orders.customer_id") is measured the same way against a reference: sqlglot column lineage over the SQL dbt compiled after dbt seed and dbt run on DuckDB (scripts/accuracy-columns/). CI re-runs it alongside the model check and fails when a number drops below its baseline.
| Project | From SQL alone | Precision | With compiled SQL + catalog | Precision |
|---|---|---|---|---|
| jaffle-shop | 87 / 87 | 100% | 87 / 87 | 100% |
| tuva | 10,359 / 12,143 | 99% | 12,141 / 12,143 | 100% |
| Fivetran dbt_hubspot | 2,146 / 2,337 | 97% | 2,337 / 2,337 | 100% |
| Fivetran dbt_jira | 713 / 971 | 98% | 971 / 971 | 99% |
| Fivetran dbt_shopify | 5,109 / 5,436 | 98% | 5,436 / 5,436 | 100% |
| Fivetran dbt_quickbooks | 2,055 / 2,993 | 99% | 2,993 / 2,993 | 100% |
| Fivetran dbt_netsuite | 1,118 / 1,831 | 98% | 1,800 / 1,831 | 99% |
| Fivetran dbt_zendesk | 1,553 / 1,665 | 99% | 1,653 / 1,665 | 100% |
| Fivetran dbt_stripe | 1,576 / 1,816 | 96% | 1,809 / 1,816 | 100% |
| Fivetran dbt_salesforce | 661 / 719 | 76% | 719 / 719 | 100% |
From SQL alone, columns of models written in SQL are traced completely, through CTEs, subqueries, joins, unions and select *. Where Jinja writes the SELECT (loops, macros producing column lists or whole queries, as in Fivetran's packages), dbt-lineage renders the model the way dbt compile would, without dbt or a warehouse: the project's and installed packages' macros (dbt_packages/, with adapter.dispatch), vars, and the columns it already knows for each upstream relation (YAML, seed headers, upstream models) answering adapter.get_columns_in_relation. What stays out of reach offline: macros that read data (run_query, pivot
只显示了开头部分;其余内容请在仓库中阅读