Skip to content

Commit 60c8533

Browse files
committed
Check the source table exists before cloning
1 parent 79c80f3 commit 60c8533

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sqlmesh/core/snapshot/evaluator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,8 +1440,9 @@ def _can_clone(self, snapshot: Snapshot, deployability_index: DeployabilityIndex
14401440
and adapter.SUPPORTS_CLONING
14411441
# managed models cannot have their schema mutated because theyre based on queries, so clone + alter wont work
14421442
and not snapshot.is_managed
1443-
# If the deployable table is missing we can't clone it
14441443
and not deployability_index.is_deployable(snapshot)
1444+
# If the deployable table is missing we can't clone it
1445+
and adapter.table_exists(snapshot.table_name())
14451446
)
14461447

14471448
def _get_data_objects(

0 commit comments

Comments
 (0)