Skip to content
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

Allow Python SDK's lineage API to accept openmetadata native entities #17896

Closed
k-ye opened this issue Sep 18, 2024 · 0 comments · Fixed by #17928
Closed

Allow Python SDK's lineage API to accept openmetadata native entities #17896

k-ye opened this issue Sep 18, 2024 · 0 comments · Fixed by #17928
Assignees
Labels
enhancement New feature or request Ingestion

Comments

@k-ye
Copy link

k-ye commented Sep 18, 2024

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like

I would like to query the lineage relationships in the Python SDK. While the SDK offers the APIs, using them correctly is still not very intuitive. For example:

  1. get_lineage_by_id(Table, entity.id): This doesn't work - the requested URL looks something like v1/lineage/table/root=UUID('abcdef')?upstreamDepth=1&downstreamDepth=1
  2. get_lineage_by_id(Table, entity.id.root): This works, with UUID being encoded correctly in the URL.

The trick is to read the .root field manually from either ID or FQN, since these are pydantic abstractions.

I'd hope that the API implementation could extract .root part automatically.

Describe alternatives you've considered

Keep it as is, make it obvious in the documentation

Additional context

Slack discussion: https://openmetadata.slack.com/archives/C02B6955S4S/p1726299424402459

@k-ye k-ye added the enhancement New feature or request label Sep 18, 2024
@k-ye k-ye changed the title Allow lineage query API's to accept openmetadata native entities Allow Python SDK's lineage API to accept openmetadata native entities Sep 18, 2024
@pmbrull pmbrull self-assigned this Sep 18, 2024
pmbrull added a commit to pmbrull/OpenMetadata that referenced this issue Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Ingestion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants