Skip to content

Ingest dbt manifest.json into Model/Source nodes + DEPENDS_ON lineage #576

Closed as not planned

Description

@alexisperinger-ux

What problem does this solve?

dbt computes a resolved dependency graph into target/manifest.json, but it is never ingested, so a project's model and source lineage is invisible to the index even though dbt already calculated it. Model-to-source lineage in particular cannot be reconstructed from source files alone.

Public test bed: dbt-labs/jaffle_shop (run dbt compile to produce target/manifest.json).

Proposed solution

Add an explicit, opt-in MCP tool ingest_dbt_manifest { project, manifest_path } that runs after index_repository against an existing project store:

  • Parse manifest.json with the vendored yyjson.
  • Emit model / seed / snapshot as Model / Seed / Snapshot nodes and source as Source nodes, keyed by dbt unique_id.
  • Emit each node's depends_on.nodes as DEPENDS_ON edges (model-to-model and model-to-source).

Zero schema change: reuses cbm_store_upsert_node / cbm_store_insert_edge and the existing DEPENDS_ON edge. Only lineage-bearing resources become nodes; test / analysis / operation are skipped. This is the authoritative dbt path, complementing source-level extraction (#575).

Alternatives considered

  • Auto-running ingestion inside index_repository when target/manifest.json is present: deferred so this adds only an explicit, opt-in tool and leaves default indexing untouched.
  • Ingesting test / analysis nodes by default: skipped to keep the graph lineage-only.

Confirmations

  • I searched existing issues and this is not a duplicate.

Activity

  1. DeusData commented on Jun 23, 2026

    @DeusData
    Owner

    Thanks — ingesting the resolved manifest.json as the authoritative dbt lineage path (opt-in ingest_dbt_manifest tool; Model / Source / Seed / Snapshot nodes + DEPENDS_ON; skipping tests / operations) is the right complement to the source-level extraction in #575.

    Implemented in your PR #583 — continuing there. Labeling enhancement / parsing/quality.

  2. added
    priority/normalStandard review queue; useful PR with ordinary maintainer urgency.
    on Jun 30, 2026
  3. added this to the 0.9.2-rc milestone on Jul 8, 2026
  4. DeusData commented on Aug 20, 2026

    @DeusData
    Owner

    Closing this as not planned in the form proposed — ingesting target/manifest.json through a dedicated MCP tool — while the underlying goal has been met from the source side.

    What shipped instead: #1756 (co-authored with @alexisperinger-ux) reads {{ ref() }} and {{ source() }} out of the repo's own .sql models during ordinary indexing, producing Model nodes and lineage edges. Combined with the Table/View nodes from #1749, "what feeds this model" and "what breaks if I change this" are now answerable in dbt repos without any extra step.

    Why not the manifest tool (detail on #583, which implemented it well): the indexing pipeline publishes a generation by building a staging database and renaming it over the live one, so anything written into the store from outside the indexer is erased by the next index run. Watched projects reindex automatically in the background, so ingested manifest nodes would disappear at an unpredictable moment with no error. The only externally-authored data that survives today is ADRs, and only because there is explicit capture-and-restore machinery for them.

    What the manifest still offers that source parsing cannot, and why this may return: resolved database and schema names, materialization strategy, seeds and snapshots, and the authoritative DAG after macro expansion. If we do take it, the shape would be a pipeline pass that reads target/manifest.json when one is present, so the data is rebuilt on every index like everything else in the graph — not a tool that injects into a store the next reindex will overwrite. That is a design conversation rather than a bug, so it belongs in a fresh proposal rather than as an open issue with no plan attached.

    Thank you @alexisperinger-ux for the issue and the implementation — the reasoning above is largely a product of reviewing your PR carefully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestparsing/qualityGraph extraction bugs, false positives, missing edgespriority/normalStandard review queue; useful PR with ordinary maintainer urgency.

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions