CLI Reference
sqlquack check
Check that Snowflake SQL parses and holds nothing Snowflake rejects, without converting it.
sqlquack check parses Snowflake SQL and reports what Snowflake would reject. It needs no schema
and no policy, and it converts nothing.
sqlquack check [OPTIONS] [PATH]sqlquack check query.sqlecho "SELECT 1 QUALIFY TRUE" | sqlquack check --jsonPATH is a SQL file. Without one, or with -, check reads standard input.
$ sqlquack check query.sqlerror[SQ0201]: Snowflake does not support INTERSECT, EXCEPT or MINUS with ALL --> query.sql:1:29 |1 | SELECT order_id FROM orders INTERSECT ALL SELECT order_id FROM orders | ^^^^^^^^^^^^^ Snowflake does not support INTERSECT with ALL | = help: drop ALL to compare distinct rows; only UNION accepts ALL in Snowflakesqlquack check: found 1 problemWhat it reports
Section titled “What it reports”- SQL that does not parse:
SQ0001, with the span where the parser stopped. - Input beyond the parser’s limits: the
SQ01xxcodes. - SQL that parses but that Snowflake rejects, such as
INTERSECT ALL,FOR UPDATE WAIT,QUALIFYwithout a window function, or a* ILIKEREPLACEorRENAMEof a column the pattern removes: theSQ02xxcodes.
Options
Section titled “Options”| Option | Meaning |
|---|---|
--format text|json |
Print the report as text for people or JSON for programs. Default text. |
--json |
The same as --format json. |
With --json, check prints {"ok": …, "diagnostics": [...]}. See
JSON output.
Exit status
Section titled “Exit status”| Code | Meaning |
|---|---|
0 |
No problem found. |
1 |
At least one problem found. |
2 |
The input holds no SQL, or can’t be read. |