Skip to content

Commit 4d8cbca

Browse files
authored
Fix: Hydrate the seed model if needed in the built-in scheduler (#859)
1 parent 6dc4a48 commit 4d8cbca

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"hyperscript",
4141
"jinja2",
4242
"pandas",
43-
"pydantic>=1.9.1,<2.0.0",
43+
"pydantic>=1.10.7,<2.0.0",
4444
"requests",
4545
"rich",
4646
"ruamel.yaml",

sqlmesh/core/scheduler.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from sqlmesh.core import constants as c
88
from sqlmesh.core.console import Console, get_console
9+
from sqlmesh.core.model import SeedModel
910
from sqlmesh.core.snapshot import (
1011
Snapshot,
1112
SnapshotEvaluator,
@@ -116,6 +117,11 @@ def evaluate(
116117
snapshot.name: snapshot,
117118
}
118119

120+
if isinstance(snapshot.model, SeedModel) and not snapshot.model.is_hydrated:
121+
snapshot = self.state_sync.get_snapshots([snapshot], hydrate_seeds=True)[
122+
snapshot.snapshot_id
123+
]
124+
119125
self.snapshot_evaluator.evaluate(
120126
snapshot,
121127
start,

0 commit comments

Comments
 (0)