Rollback restores a VDE to a prior finalized state by rebinding its refs to a stored checkpoint.Documentation Index
Fetch the complete documentation index at: https://docs.sqlbuild.com/llms.txt
Use this file to discover all available pages before exploring further.
Checkpoints
Checkpoints are created automatically when a VDE reachesfinalized status:
- After a whole build where all models match expected versions
- After a whole promotion where the target VDE is finalized
[janitor] max_checkpoints (default: 20).
Basic rollback
Restore the previous finalized checkpoint for the default VDE:Explicit checkpoint
Restore a specific checkpoint:sqb state checkpoints list to see available checkpoints.
What happens during rollback
- Target VDE lock is acquired
- The target checkpoint is located (previous finalized by default, or explicit id)
- Checkpoint physical relations are validated to still exist in the warehouse
- VDE refs are replaced with the checkpoint’s ref set
- VDE function refs are replaced with the checkpoint’s function ref set
- Logical VDE views are refreshed to point at the restored physical versions
- Function definitions are republished from the checkpoint’s function versions
- Target VDE lock is released
Partial rollback
Roll back a subset of models:--include-stale-upstreams to add required upstream refs from the checkpoint:
Guards
| Condition | Behavior |
|---|---|
| No previous checkpoint exists | Blocks. Build the VDE first to create a finalized checkpoint. |
| Checkpoint physical relations deleted | Blocks. The physical version tables have been cleaned up by janitor. Use a more recent checkpoint or rebuild. |
| Unknown checkpoint id | Blocks with error. |
| Target VDE is locked | Blocks. Wait or clear the lock. |
| Target VDE is detached | Blocks. Detached VDEs cannot be rolled back. |
| Partial rollback leaves VDE working | Blocks unless --allow-partial-rollback is set. |

