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"
3004
3004
)
3005
+
3006
+
3007
+
deftest_plan_no_start_configured():
3008
+
context=Context(config=Config())
3009
+
context.upsert_model(
3010
+
load_sql_based_model(
3011
+
parse(
3012
+
"""
3013
+
MODEL(
3014
+
name db.xvg,
3015
+
kind INCREMENTAL_BY_TIME_RANGE (
3016
+
time_column ds
3017
+
),
3018
+
cron '@daily'
3019
+
);
3020
+
3021
+
SELECT id, ds FROM (VALUES
3022
+
('1', '2020-01-01'),
3023
+
) data(id, ds)
3024
+
WHERE ds BETWEEN @start_ds AND @end_ds
3025
+
"""
3026
+
)
3027
+
)
3028
+
)
3029
+
3030
+
prod_plan=context.plan(auto_apply=True)
3031
+
assertlen(prod_plan.new_snapshots) ==1
3032
+
3033
+
context.upsert_model(
3034
+
load_sql_based_model(
3035
+
parse(
3036
+
"""
3037
+
MODEL(
3038
+
name db.xvg,
3039
+
kind INCREMENTAL_BY_TIME_RANGE (
3040
+
time_column ds
3041
+
),
3042
+
cron '@daily',
3043
+
physical_properties ('some_prop' = 1),
3044
+
);
3045
+
3046
+
SELECT id, ds FROM (VALUES
3047
+
('1', '2020-01-01'),
3048
+
) data(id, ds)
3049
+
WHERE ds BETWEEN @start_ds AND @end_ds
3050
+
"""
3051
+
)
3052
+
)
3053
+
)
3054
+
3055
+
# 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
3056
+
withpytest.raises(
3057
+
SQLMeshError,
3058
+
match=r"Set the `start` attribute in your project config model defaults to avoid this issue",
0 commit comments