File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
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
Original file line number Diff line number Diff line change @@ -2110,11 +2110,11 @@ def test_allow_partials_by_default():
21102110 sql = "SELECT * FROM baz" ,
21112111 materialized = Materialization .TABLE .value ,
21122112 )
2113- assert model .allow_partials is None
2113+ assert model .allow_partials
21142114 assert model .to_sqlmesh (context ).allow_partials
21152115
21162116 model .materialized = Materialization .INCREMENTAL .value
2117- assert model .allow_partials is None
2117+ assert model .allow_partials
21182118 assert model .to_sqlmesh (context ).allow_partials
21192119
21202120 model .allow_partials = True
You can’t perform that action at this time.
0 commit comments