Skip to content

Commit

Permalink
feat(ingestion): PowerBI # Remove corpUserInfo aspect ingestion (#7034)
Browse files Browse the repository at this point in the history
Co-authored-by: MohdSiddique Bagwan <[email protected]>
  • Loading branch information
siddiquebagwan and siddiquebagwan-gslab authored Jan 13, 2023
1 parent f0432ee commit 2ae8fe5
Show file tree
Hide file tree
Showing 5 changed files with 752 additions and 514 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
ChangeTypeClass,
ChartInfoClass,
ChartKeyClass,
CorpUserInfoClass,
CorpUserKeyClass,
DashboardInfoClass,
DashboardKeyClass,
Expand Down Expand Up @@ -436,28 +435,6 @@ def to_datahub_user(
# Create an URN for user
user_urn = builder.make_user_urn(user.get_urn_part())

user_info_instance = CorpUserInfoClass(
displayName=user.displayName,
email=user.emailAddress,
title=user.displayName,
active=True,
)

info_mcp = self.new_mcp(
entity_type=Constant.CORP_USER,
entity_urn=user_urn,
aspect_name=Constant.CORP_USER_INFO,
aspect=user_info_instance,
)

# removed status mcp
status_mcp = self.new_mcp(
entity_type=Constant.CORP_USER,
entity_urn=user_urn,
aspect_name=Constant.STATUS,
aspect=StatusClass(removed=False),
)

user_key = CorpUserKeyClass(username=user.id)

user_key_mcp = self.new_mcp(
Expand All @@ -467,7 +444,7 @@ def to_datahub_user(
aspect=user_key,
)

return [info_mcp, status_mcp, user_key_mcp]
return [user_key_mcp]

def to_datahub_users(
self, users: List[PowerBiAPI.User]
Expand Down
Loading

0 comments on commit 2ae8fe5

Please sign in to comment.