-
Notifications
You must be signed in to change notification settings - Fork 301
Description
Recently, sqlmesh started failing to cleanup a few tables, so i could not execute sqlmesh run, or sqlmesh janitor, or sqlmesh destroy.
The staring cause remains unknown, butt It turns out it was trying to remove a table which did not exist during the cleanup stage.
Please add a command to make sqlmesh remove all state tables/references for a model and begin from scratch. That way if you come across this type of bug you have a reasonable solution to deal with it
One would think that changing the stamp, and executing plan with restate would do it but it didn't, and there seems to be no way to achieve it.
The work around I did was to manually delete all sqlmesh related schemas and restart the project, but its obviously not a reasonable approach for using this tool in production.