Skip to content

Commit

Permalink
Add feature flag for view defintions (datahub-project#10914)
Browse files Browse the repository at this point in the history
Co-authored-by: Ethan Cartwright <[email protected]>
  • Loading branch information
2 people authored and aviv-julienjehannet committed Jul 25, 2024
1 parent 311e0ba commit cda9e87
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit cda9e87

Please sign in to comment.