From 309f6ecd731d01a788eeed9469c821485e328dc6 Mon Sep 17 00:00:00 2001 From: Aseem Bansal Date: Wed, 9 Oct 2024 17:59:06 +0530 Subject: [PATCH] update to send type and type urns --- glossary-sync.py | 12 ++++++++++++ requirements.txt | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/glossary-sync.py b/glossary-sync.py index 43f96fc..42bff7d 100644 --- a/glossary-sync.py +++ b/glossary-sync.py @@ -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=[ @@ -72,6 +82,8 @@ def _datahub_ownership_to_owners( if guess_entity_type(urn) == "corpGroup" ] or None, + type=owner_type, + typeUrn=owner_type_urn, ) diff --git a/requirements.txt b/requirements.txt index adf1372..f7d85bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -acryl-datahub[datahub-business-glossary]==0.14.0.5 +acryl-datahub[datahub-business-glossary]==0.14.1.2 ruamel.yaml