-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add description for get_lineage Too #8233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@Muizzkolapo is attempting to deploy a commit to the dbt-labs Team on Vercel. A member of the Team first needs to authorize it. |
|
hey @Muizzkolapo , thanks for opening this up! i'll close this pr up since i notice the pr dbt-labs/dbt-mcp#484 is closed. please let us know if we need to reopen it or if it was a mistake! |
@mirnawong1 no worries! new one is here dbt-labs/dbt-mcp#502, Just waiting for Devon's approval. I will raise a new pr on merge. |
…502) ## Summary A User building a catalog-like experience with dbt and Snowflake via Claude Desktop requested full lineage capabilities #110: > "Get the full lineage of a model, not only its children/parents. To parse the full lineage with the official MCP it would require quite a few calls to the tool to parse through all layers, which would be nice to get the server doing async instead providing the full list as a return." --- ## What Changed Added a new `get_lineage` tool that enables efficient lineage traversal across all dbt resource types using the Discovery API's `lineage()` endpoint. ### Key Implementation Details **Query Approach:** - Uses Discovery API's `lineage()` endpoint to fetch the entire lineage graph in a single API call - Requests minimal fields: `name`, `uniqueId`, `resourceType`, and `parentIds` - Pre-builds a children adjacency map for descendant lookups **Why Not Use Selector Syntax?** The selector parameters (`select: "model+"`, `exclude: "test_*"`) does not seem to be available in the public API: ## Test Case <img width="1264" height="783" alt="image" src="https://github.com/user-attachments/assets/ee045546-9979-48e2-b31a-7780f85c81e1" /> Search for any exposures: <img width="1264" height="833" alt="image" src="https://github.com/user-attachments/assets/8ba63f3d-cc99-4e7f-a63a-811881a6f847" /> ## Why Implementing to close #110 ## Related Issues <!-- Link any related issues using #issue_number --> Closes ##110 Related to ##110 ## Checklist - [x] I have performed a self-review of my code - [x] I have made corresponding changes to the documentation (in https://github.com/dbt-labs/docs.getdbt.com) if required -- Mention it here dbt-labs/docs.getdbt.com#8233 - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes ## Additional Notes <!-- Any additional information that would be helpful for reviewers --> ## Related Issues <!-- Link any related issues using #issue_number --> Closes # Related to # ## Checklist - [x] I have performed a self-review of my code - [x] I have made corresponding changes to the documentation (in https://github.com/dbt-labs/docs.getdbt.com) if required -- Mention it here dbt-labs/docs.getdbt.com#8233 - [x] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes ## Additional Notes <!-- Any additional information that would be helpful for reviewers --> --------- Co-authored-by: Devon Fulcher <[email protected]>
What are you changing in this pull request and why?
This pr adds descriptions for a new mcp tools, get_lineage. The change is related to hhttps://github.com/dbt-labs/dbt-mcp/pull/484
To learn more about the writing conventions used in the dbt Labs docs, see the Content style guide.
-->
Checklist