Skip to content

Commit 47ee12f

Browse files
tobymaogeorgesittas
authored andcommitted
fix: temporarily remove validation on annotated depends on to fix issues (#2445)
1 parent 7600d8d commit 47ee12f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

sqlmesh/core/model/definition.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,11 +1057,11 @@ def validate_definition(self) -> None:
10571057
if count > 1:
10581058
raise_config_error(f"Found duplicate outer select name '{name}'", self._path)
10591059

1060-
if self.depends_on_past and not self.annotated:
1061-
raise_config_error(
1062-
"Self-referencing models require inferrable column types. There are three options available to mitigate this issue: add explicit types to all projections in the outermost SELECT statement, leverage external models (https://sqlmesh.readthedocs.io/en/stable/concepts/models/external_models/), or use the `columns` model attribute (https://sqlmesh.readthedocs.io/en/stable/concepts/models/overview/#columns).",
1063-
self._path,
1064-
)
1060+
# if self.depends_on_past and not self.annotated:
1061+
# raise_config_error(
1062+
# "Self-referencing models require inferrable column types. There are three options available to mitigate this issue: add explicit types to all projections in the outermost SELECT statement, leverage external models (https://sqlmesh.readthedocs.io/en/stable/concepts/models/external_models/), or use the `columns` model attribute (https://sqlmesh.readthedocs.io/en/stable/concepts/models/overview/#columns).",
1063+
# self._path,
1064+
# )
10651065

10661066
super().validate_definition()
10671067

tests/core/test_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def test_model_multiple_select_statements():
172172
"query, error",
173173
[
174174
("y::int, x::int AS y", "duplicate"),
175-
("* FROM db.table", "require inferrable column types"),
175+
# ("* FROM db.table", "require inferrable column types"),
176176
],
177177
)
178178
def test_model_validation(query, error):

0 commit comments

Comments
 (0)