Skip to main content
Reconcile detects and repairs inconsistencies between the virtual state store and the actual warehouse objects.

Report

Run reconcile without a subcommand to get a diagnostic report:
This inspects the VDE’s refs, checks that logical views exist and point to the expected physical relations, and reports any issues without changing anything.

Repair view

Recreate a logical VDE view from trusted state:
This runs CREATE OR REPLACE VIEW for the logical VDE view, pointing it at the physical version relation recorded in the VDE’s refs. It is idempotent - running it when the view is already correct is a no-op.

Guards

No confirmation is needed. The command is explicit and idempotent.

Attach

Rebind a VDE model ref to a different tracked physical relation:
This updates the VDE ref for fact_orders to point at the specified physical relation and refreshes the logical view.

Guards

Attach requires confirmation by default. Type the confirmation text when prompted, or cancel to leave refs unchanged.

When to use reconcile

  • Missing logical views after a failed build, promotion, or detach - use repair-view
  • Wrong physical version if a VDE ref was corrupted or you need to manually override which version a model points to - use attach
  • Diagnostic inspection before or after recovery operations - use the default report
Reconcile records events in the reconcile_events state table for audit trail.

Limitations

Reconcile repairs pointer/view state. It does not rebuild physical versions. If a physical relation is missing from the warehouse, the only remedy is rebuilding the model with sqb build --select <model>.