Skip to content

Commit

Permalink
Alter formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
VersusFacit committed Feb 27, 2024
1 parent efa592d commit def1d47
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions dbt/adapters/snowflake/relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
@dataclass(frozen=True, eq=False, repr=False)
class SnowflakeRelation(BaseRelation):
type: Optional[SnowflakeRelationType] = None # type: ignore
quote_policy: SnowflakeQuotePolicy = field(
default_factory=lambda: SnowflakeQuotePolicy()
)
quote_policy: SnowflakeQuotePolicy = field(default_factory=lambda: SnowflakeQuotePolicy())

renameable_relations: FrozenSet[SnowflakeRelationType] = field(
default_factory=lambda: frozenset(
Expand Down Expand Up @@ -61,24 +59,17 @@ def dynamic_table_config_changeset(
existing_dynamic_table = SnowflakeDynamicTableConfig.from_relation_results(
relation_results
)
new_dynamic_table = SnowflakeDynamicTableConfig.from_relation_config(
relation_config
)
new_dynamic_table = SnowflakeDynamicTableConfig.from_relation_config(relation_config)

config_change_collection = SnowflakeDynamicTableConfigChangeset()

if new_dynamic_table.target_lag != existing_dynamic_table.target_lag:
config_change_collection.target_lag = (
SnowflakeDynamicTableTargetLagConfigChange(
action=RelationConfigChangeAction.alter,
context=new_dynamic_table.target_lag,
)
config_change_collection.target_lag = SnowflakeDynamicTableTargetLagConfigChange(
action=RelationConfigChangeAction.alter,
context=new_dynamic_table.target_lag,
)

if (
new_dynamic_table.snowflake_warehouse
!= existing_dynamic_table.snowflake_warehouse
):
if new_dynamic_table.snowflake_warehouse != existing_dynamic_table.snowflake_warehouse:
config_change_collection.snowflake_warehouse = (
SnowflakeDynamicTableWarehouseConfigChange(
action=RelationConfigChangeAction.alter,
Expand Down

0 comments on commit def1d47

Please sign in to comment.