diff --git a/metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_config.py b/metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_config.py index f6247eb949417..365e32dac3e69 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_config.py +++ b/metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_config.py @@ -181,6 +181,11 @@ class SnowflakeV2Config( description="If enabled, populates the snowflake usage statistics. Requires appropriate grants given to the role.", ) + include_view_definitions: bool = Field( + default=True, + description="If enabled, populates the ingested views' definitions.", + ) + include_technical_schema: bool = Field( default=True, description="If enabled, populates the snowflake technical schema and descriptions.", diff --git a/metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_schema_gen.py b/metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_schema_gen.py index e604ed96b8eb6..dcc18635de32c 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_schema_gen.py +++ b/metadata-ingestion/src/datahub/ingestion/source/snowflake/snowflake_schema_gen.py @@ -753,7 +753,11 @@ def gen_dataset_workunits( view_properties_aspect = ViewProperties( materialized=table.materialized, viewLanguage="SQL", - viewLogic=table.view_definition, + viewLogic=( + table.view_definition + if self.config.include_view_definitions + else "" + ), ) yield MetadataChangeProposalWrapper(