Repository navigation
feat: use the built-in policy when there is no policy file - #120
Merged
Merged
Conversation
Without --policy and without sqlquack.toml in the current directory, convert, function, census, index and the Python API now use the built-in policy, which refuses every known divergence, instead of exiting 2. --builtin-policy still chooses it explicitly. A --policy file that does not exist, or an invalid policy file, is still an error.
Contributor
Author
|
Gate on a677aab (based on main 37e3767):
|
Contributor
Author
|
Landing gate at 05c97e7 (main 50e3efb merged):
|
kvlonge
added a commit
that referenced
this pull request
Nov 6, 2026
05c97e7 32 models: incremental models compiled by dbt-snowflake 1.12 as an incremental run, its snapshot staging SQL for the check and timestamp strategies, merge and delete+insert DML with several incremental predicates, QUALIFY dedup edge cases and MERGE shapes. The corpus test helper passes the policy path as an Option, as #120 expects.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
In a fresh folder,
sqlquack convert revenue.sql --schema schema.json, the command on the homepage, exited 2 because nosqlquack.tomlwas there. Without a policy file, SQLQuack now uses the built-in policy, which refuses every known divergence.Changes
convert,function,censusandindexread the file--policynames, elsesqlquack.tomlin the current directory, else the built-in policy. The Python API does the same.--builtin-policystill chooses the built-in policy, even where asqlquack.tomlexists. A--policyfile that doesn't exist, or a policy file that isn't valid, is still a usage error (exit 2).Verification
--builtin-policystill refuses it.--policyfile and an invalid sqlquack.toml exit 2.make check-ci,make test-rust,make verify-recorded.