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

refactor(tags): Use TagUrn class when generating urn #10786

Merged
merged 5 commits into from
Jun 27, 2024
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions metadata-ingestion/src/datahub/emitter/mce_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
from datahub.utilities.urn_encoder import UrnEncoder
from datahub.utilities.urns.data_flow_urn import DataFlowUrn
from datahub.utilities.urns.dataset_urn import DatasetUrn
from datahub.utilities.urns.tag_urn import TagUrn

logger = logging.getLogger(__name__)
Aspect = TypeVar("Aspect", bound=AspectAbstract)
Expand Down Expand Up @@ -238,8 +239,7 @@ def make_tag_urn(tag: str) -> str:
"""
if tag and tag.startswith("urn:li:tag:"):
return tag
else:
return f"urn:li:tag:{tag}"
return str(TagUrn.create_from_id(id=tag))
hsheth2 marked this conversation as resolved.
Show resolved Hide resolved


def make_owner_urn(owner: str, owner_type: OwnerType) -> str:
Expand Down
Loading