Skip to content

fix: make model: and column: prefixes optional in sqb rename and sqb mv - #970

Merged
kvlonge merged 1 commit into
mainfrom
fix/optional-rename-prefixes
Oct 6, 2026
Merged

kvlonge merged 1 commit into
mainfrom
fix/optional-rename-prefixes

Conversation

@kvlonge

@kvlonge kvlonge commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Why

sqb rename and sqb mv required model: and column: prefixes, so sqb rename stg_orders.amount revenue and sqb mv fact_orders models/reporting/ failed, while sqb lineage already accepted bare targets.

Changes

  • sqb rename and sqb mv accept bare <model> and <model>.<column> targets; the prefixes still work.
  • One target resolver shared with sqb lineage, which now also accepts the column: prefix.
  • Clear errors when a target names a source, seed or function, a prefix contradicts the resource, column: has no column, or sqb mv gets a column.
  • Help text, the planner rename hint, the rename and column-migration docs, README, examples README and the bundled skill show the bare form.

Verification

  • Unit tests for target parsing and lineage prefix handling; an integration test for a bare column rename and a bare model mv.
  • Focused refactor, lineage and planner tests, ruff, fensu check and make check-ci.

Resolve rename and mv targets with the same resolver sqb lineage uses, so a
bare <model> renames or moves the model and <model>.<column> renames the
column. Prefixed forms keep working. Targets naming a source, seed or function,
or a prefix that contradicts the resource, fail with C954 and say what was
found. sqb lineage now also accepts the column: prefix.
@kvlonge
kvlonge enabled auto-merge (squash) October 6, 2026 10:26
@kvlonge
kvlonge merged commit 0b11ca6 into main Oct 6, 2026
32 checks passed
@kvlonge
kvlonge deleted the fix/optional-rename-prefixes branch October 6, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant