diff --git a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java index 1fb01e9ed0d521..c20fc7fef6ef68 100644 --- a/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java +++ b/datahub-graphql-core/src/main/java/com/linkedin/datahub/graphql/GmsGraphQLEngine.java @@ -830,10 +830,10 @@ public GraphQLEngine.Builder builder() { builder .addDataLoaders(loaderSuppliers(loadableTypes)) .addDataLoader("Aspect", context -> createDataLoader(aspectType, context)) - .configureRuntimeWiring(this::configureRuntimeWiring) .setGraphQLQueryComplexityLimit(graphQLQueryComplexityLimit) .setGraphQLQueryDepthLimit(graphQLQueryDepthLimit) - .setGraphQLQueryIntrospectionEnabled(graphQLQueryIntrospectionEnabled); + .setGraphQLQueryIntrospectionEnabled(graphQLQueryIntrospectionEnabled) + .configureRuntimeWiring(this::configureRuntimeWiring); return builder; } diff --git a/metadata-ingestion/src/datahub/ingestion/source/slack/slack.py b/metadata-ingestion/src/datahub/ingestion/source/slack/slack.py index 746f71fb0af370..00b783a89774cc 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/slack/slack.py +++ b/metadata-ingestion/src/datahub/ingestion/source/slack/slack.py @@ -38,6 +38,8 @@ class CorpUser: title: Optional[str] = None image_url: Optional[str] = None phone: Optional[str] = None + real_name: Optional[str] = None + slack_display_name: Optional[str] = None class SlackSourceConfig(ConfigModel): @@ -144,6 +146,12 @@ def get_user_info(self) -> Iterable[MetadataWorkUnit]: corpuser_editable_info.pictureLink = user_obj.image_url if user_obj.phone: corpuser_editable_info.phone = user_obj.phone + if ( + not corpuser_editable_info.displayName + or corpuser_editable_info.displayName == corpuser_editable_info.email + ): + # let's fill out a real name + corpuser_editable_info.displayName = user_obj.real_name yield MetadataWorkUnit( id=f"{user_obj.urn}", mcp=MetadataChangeProposalWrapper( @@ -259,6 +267,9 @@ def populate_user_profile(self, user_obj: CorpUser) -> None: user_obj.title = user_profile.get("title") user_obj.image_url = user_profile.get("image_192") user_obj.phone = user_profile.get("phone") + user_obj.real_name = user_profile.get("real_name") + user_obj.slack_display_name = user_profile.get("display_name") + except Exception as e: if "missing_scope" in str(e): if self._use_users_info: