Stage 5 SQL Refactoring - accelerate-data/migration-utility GitHub Wiki
/refactor restructures source SQL into import/logical/final CTE form and persists only proof-backed results.
manifest.json- completed scoping
- completed profiling
- approved test spec
- sandbox available if you want executable compare proof
If the sandbox is unavailable or you explicitly skip executable compare, the command can still persist semantic-review-backed results as partial.
/refactor silver.DimCustomer silver.FactInternetSales
- gather refactor context
- extract the ground-truth SQL
- restructure it into import/logical/final CTEs
- run semantic review and, when available, executable compare
- persist the refactor result
- commit successful items and optionally raise a PR
For table migrations, the proof-backed refactor is persisted on the selected writer procedure catalog entry:
catalog/procedures/<selected_writer>.json
For views and materialized views, the refactor is persisted on the view catalog entry:
catalog/views/<item_id>.json
That persisted refactor state is what /generate-model consumes later.
-
okfor proof-backed success -
partialwhen semantic proof succeeded but executable proof was skipped or incomplete -
errorwhen refactor could not be completed
Proceed to Stage 4 Model Generation.