File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -2817,6 +2817,9 @@ def render_field_value(value: t.Any) -> t.Any:
2817
2817
for key , value in field_value .items ():
2818
2818
if key in RUNTIME_RENDERED_MODEL_FIELDS :
2819
2819
rendered_dict [key ] = parse_strings_with_macro_refs (value , dialect )
2820
+ elif key == "auto_restatement_cron" :
2821
+ # Don't parse auto_restatement_cron="@..." kwarg (e.g. @daily) into MacroVar
2822
+ rendered_dict [key ] = value
2820
2823
elif (rendered := render_field_value (value )) is not None :
2821
2824
rendered_dict [key ] = rendered
2822
2825
Original file line number Diff line number Diff line change @@ -2881,7 +2881,15 @@ def my_model_2(context):
2881
2881
# no warning with valid kind dict
2882
2882
with patch .object (get_console (), "log_warning" ) as mock_logger :
2883
2883
2884
- @model ("kind_valid_dict" , kind = dict (name = ModelKindName .FULL ), columns = {'"COL"' : "int" })
2884
+ @model (
2885
+ "kind_valid_dict" ,
2886
+ kind = dict (
2887
+ name = ModelKindName .INCREMENTAL_BY_TIME_RANGE ,
2888
+ time_column = "ds" ,
2889
+ auto_restatement_cron = "@hourly" ,
2890
+ ),
2891
+ columns = {'"ds"' : "date" , '"COL"' : "int" },
2892
+ )
2885
2893
def my_model (context ):
2886
2894
pass
2887
2895
@@ -2890,7 +2898,7 @@ def my_model(context):
2890
2898
path = Path ("." ),
2891
2899
)
2892
2900
2893
- assert isinstance (python_model .kind , FullKind )
2901
+ assert isinstance (python_model .kind , IncrementalByTimeRangeKind )
2894
2902
2895
2903
assert not mock_logger .call_args
2896
2904
You can’t perform that action at this time.
0 commit comments