diff --git a/metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_v2.py b/metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_v2.py index 9bb6226b49..f155ac24fe 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_v2.py +++ b/metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_v2.py @@ -254,7 +254,18 @@ class SnowflakeV2Source( platform=self.platform, platform_instance=self.config.platform_instance, env=self.config.env, - graph=self.ctx.graph, + graph=( + # If we're ingestion schema metadata for tables/views, then we will populate + # schemas into the resolver as we go. We only need to do a bulk fetch + # if we're not ingesting schema metadata as part of ingestion. + self.ctx.graph + if not ( + self.config.include_technical_schema + and self.config.include_tables + and self.config.include_views + ) + else None + ), generate_usage_statistics=False, generate_operations=False, format_queries=self.config.format_sql_queries, @@ -1252,7 +1263,7 @@ class SnowflakeV2Source( foreignKeys=foreign_keys, ) - if self.aggregator and self.config.parse_view_ddl: + if self.aggregator: self.aggregator.register_schema(urn=dataset_urn, schema=schema_metadata) return schema_metadata