You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f"External model with uppercase gateway in YAML should be found. Found {len(uppercase_in_yaml_models)} models"
3009
3009
)
3010
+
3011
+
3012
+
deftest_plan_no_start_configured():
3013
+
context=Context(config=Config())
3014
+
context.upsert_model(
3015
+
load_sql_based_model(
3016
+
parse(
3017
+
"""
3018
+
MODEL(
3019
+
name db.xvg,
3020
+
kind INCREMENTAL_BY_TIME_RANGE (
3021
+
time_column ds
3022
+
),
3023
+
cron '@daily'
3024
+
);
3025
+
3026
+
SELECT id, ds FROM (VALUES
3027
+
('1', '2020-01-01'),
3028
+
) data(id, ds)
3029
+
WHERE ds BETWEEN @start_ds AND @end_ds
3030
+
"""
3031
+
)
3032
+
)
3033
+
)
3034
+
3035
+
prod_plan=context.plan(auto_apply=True)
3036
+
assertlen(prod_plan.new_snapshots) ==1
3037
+
3038
+
context.upsert_model(
3039
+
load_sql_based_model(
3040
+
parse(
3041
+
"""
3042
+
MODEL(
3043
+
name db.xvg,
3044
+
kind INCREMENTAL_BY_TIME_RANGE (
3045
+
time_column ds
3046
+
),
3047
+
cron '@daily',
3048
+
physical_properties ('some_prop' = 1),
3049
+
);
3050
+
3051
+
SELECT id, ds FROM (VALUES
3052
+
('1', '2020-01-01'),
3053
+
) data(id, ds)
3054
+
WHERE ds BETWEEN @start_ds AND @end_ds
3055
+
"""
3056
+
)
3057
+
)
3058
+
)
3059
+
3060
+
# This should raise an error because the model has no start configured and the end time is less than the start time which will be calculated from the intervals
3061
+
withpytest.raises(
3062
+
SQLMeshError,
3063
+
match=r"Set the `start` attribute in your project config model defaults to avoid this issue",
0 commit comments