File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ class ModelConfig(BaseModelConfig):
8383 batch_concurrency : t .Optional [int ] = None
8484 forward_only : bool = True
8585 disable_restatement : t .Optional [bool ] = None
86- allow_partials : t . Optional [ bool ] = None
86+ allow_partials : bool = True
8787 physical_version : t .Optional [str ] = None
8888 auto_restatement_cron : t .Optional [str ] = None
8989 auto_restatement_intervals : t .Optional [int ] = None
@@ -620,11 +620,7 @@ def to_sqlmesh(
620620 model_kwargs ["physical_properties" ] = physical_properties
621621
622622 allow_partials = model_kwargs .pop ("allow_partials" , None )
623- if (
624- allow_partials is None
625- and kind .is_materialized
626- and not kind .is_incremental_by_time_range
627- ):
623+ if allow_partials is None :
628624 # Set allow_partials to True for dbt models to preserve the original semantics.
629625 allow_partials = True
630626
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ def test_model_to_sqlmesh_fields(dbt_dummy_postgres_config: PostgresConfig):
137137 assert model .dialect == "postgres"
138138 assert model .owner == "Sally"
139139 assert model .tags == ["test" , "incremental" ]
140+ assert model .allow_partials
140141 kind = t .cast (IncrementalByUniqueKeyKind , model .kind )
141142 assert kind .batch_size == 5
142143 assert kind .lookback == 3
You can’t perform that action at this time.
0 commit comments