-
Notifications
You must be signed in to change notification settings - Fork 3k
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
feat(sdk): support urns in other urn constructors #12311
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. see 4 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
def test_urns_in_init() -> None: | ||
platform = DataPlatformUrn("abc") | ||
assert platform.urn() == "urn:li:dataPlatform:abc" | ||
|
||
dataset_urn = DatasetUrn(platform, "def", "PROD") | ||
assert dataset_urn.urn() == "urn:li:dataset:(urn:li:dataPlatform:abc,def,PROD)" | ||
|
||
schema_field = SchemaFieldUrn(dataset_urn, "foo") | ||
assert ( | ||
schema_field.urn() | ||
== "urn:li:schemaField:(urn:li:dataset:(urn:li:dataPlatform:abc,def,PROD),foo)" | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any result different than this before looks like an error. So this seems more like a bug fix than a feat PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All existing functionality is kept as is
It used be the case that things like SchemaFieldUrn(dataset, field) required dataset to be a string. But now it supports DatasetUrn
as well. That's why I marked it as a feat.
It used be the case that things like SchemaFieldUrn(dataset, field) required dataset to be a string. Now it supports
DatasetUrn
as well.Checklist