Skip to content

Commit

Permalink
Merge branch 'datahub-project:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal authored Nov 13, 2024
2 parents 05e3ed4 + 8bbfa8c commit 2b4c061
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions metadata-ingestion/src/datahub/ingestion/source/dbt/dbt_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -1822,16 +1822,21 @@ def _aggregate_owners(
logger.debug(
f"Owner after applying owner extraction pattern:'{self.config.owner_extraction_pattern}' is '{owner}'."
)
if self.config.strip_user_ids_from_email:
owner = owner.split("@")[0]
logger.debug(f"Owner (after stripping email):{owner}")

owner_list.append(
OwnerClass(
owner=mce_builder.make_user_urn(owner),
type=OwnershipTypeClass.DATAOWNER,
if isinstance(owner, list):
owners = owner
else:
owners = [owner]
for owner in owners:
if self.config.strip_user_ids_from_email:
owner = owner.split("@")[0]
logger.debug(f"Owner (after stripping email):{owner}")

owner_list.append(
OwnerClass(
owner=mce_builder.make_user_urn(owner),
type=OwnershipTypeClass.DATAOWNER,
)
)
)

owner_list = sorted(owner_list, key=lambda x: x.owner)
return owner_list
Expand Down

0 comments on commit 2b4c061

Please sign in to comment.