File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -131,14 +131,14 @@ def only_execution_time(self) -> bool:
131131 @property
132132 def full_history_restatement_only (self ) -> bool :
133133 """Whether or not this model only supports restatement of full history."""
134- return self . model_kind_name in (
135- ModelKindName . INCREMENTAL_UNMANAGED ,
136- ModelKindName . INCREMENTAL_BY_UNIQUE_KEY ,
137- ModelKindName . INCREMENTAL_BY_PARTITION ,
138- ModelKindName . SCD_TYPE_2 ,
139- ModelKindName . MANAGED ,
140- ModelKindName . FULL ,
141- ModelKindName . VIEW ,
134+ return (
135+ self . is_incremental_unmanaged
136+ or self . is_incremental_by_unique_key
137+ or self . is_incremental_by_partition
138+ or self . is_scd_type_2
139+ or self . is_managed
140+ or self . is_full
141+ or self . is_view
142142 )
143143
144144 @property
Original file line number Diff line number Diff line change @@ -8665,3 +8665,10 @@ def test_data_hash_unchanged_when_column_type_uses_default_dialect():
86658665
86668666 # int == int64 in bigquery
86678667 assert model .data_hash == deserialized_model .data_hash
8668+
8669+
8670+ def test_scd_type_2_full_history_restatement ():
8671+ assert ModelKindName .SCD_TYPE_2 .full_history_restatement_only is True
8672+ assert ModelKindName .SCD_TYPE_2_BY_TIME .full_history_restatement_only is True
8673+ assert ModelKindName .SCD_TYPE_2_BY_COLUMN .full_history_restatement_only is True
8674+ assert ModelKindName .INCREMENTAL_BY_TIME_RANGE .full_history_restatement_only is False
You can’t perform that action at this time.
0 commit comments