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

update to send type and type urns #6

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
12 changes: 12 additions & 0 deletions glossary-sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ def _datahub_ownership_to_owners(
return None

owner_urns = [owner.owner for owner in ownership.owners]
owner_type = "DEVELOPER"
owner_type_urn = None
for owners in ownership.owners:
if owners.typeUrn:
# Current glossary file format does not support type per user or group
# So we just take the first one for now
# More accurate representation would require changing the glossary file format
owner_type_urn = owners.typeUrn
owner_type = owners.type
break

return Owners(
users=[
Expand All @@ -72,6 +82,8 @@ def _datahub_ownership_to_owners(
if guess_entity_type(urn) == "corpGroup"
]
or None,
type=owner_type,
typeUrn=owner_type_urn,
)


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
acryl-datahub[datahub-business-glossary]==0.14.0.5
acryl-datahub[datahub-business-glossary]==0.14.1.2
ruamel.yaml