feat: add get_lineage() to Python client#3104
Open
psaikaushik wants to merge 1 commit intoMarquezProject:mainfrom
Open
feat: add get_lineage() to Python client#3104psaikaushik wants to merge 1 commit intoMarquezProject:mainfrom
psaikaushik wants to merge 1 commit intoMarquezProject:mainfrom
Conversation
Add MarquezClient.get_lineage(node_id, depth) method that fetches the lineage graph for a given node via GET /api/v1/lineage. The node_id format follows the existing convention: - For datasets: "dataset:<namespace>:<name>" - For jobs: "job:<namespace>:<name>" This was the last missing piece: users could already fetch column lineage but not the standard lineage graph from the Python client. Closes MarquezProject#1798 Signed-off-by: Sai Kaushik Ponnekanti <psaikaushik@gmail.com>
Author
|
@wslulciuc , @davidjgoss : Can you please take a look and let me know. thanks! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3104 +/- ##
=========================================
Coverage 81.18% 81.18%
Complexity 1506 1506
=========================================
Files 268 268
Lines 7356 7356
Branches 325 325
=========================================
Hits 5972 5972
Misses 1226 1226
Partials 158 158 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the missing
get_lineage(node_id, depth)method to the Python client, allowing users to fetch the lineage graph for any node directly from Python without resorting to rawcurlcalls.Closes #1798 (Python client portion)
What Changed
Added
MarquezClient.get_lineage()that callsGET /api/v1/lineage?nodeId=&depth=.The method follows the same patterns as existing client methods:
node_idmust not be None)DEFAULT_DEPTH(20) when depth is not specifiedUsage
Note
This PR covers the Python client. The Java client portion of #1798 will be a separate PR.
Checklist