diff --git a/website/public/index.html b/website/public/index.html index 2f8a9b62b..d9d624aed 100644 --- a/website/public/index.html +++ b/website/public/index.html @@ -203,16 +203,16 @@

See what a whole project needs

Point it at a folder of compiled SQL, such as dbt's target/compiled. It counts the constructs, how many convert, and which refusals block the rest.

Run a census →

-
sqlquack census target/compiled/my_project/models --schema schema.json
-Census of 3 snowflake SQL files
-  parsed 3 (3 statements), unparsed 0, empty 0
-  distinct constructs 15 (2 clause, 4 fn, 9 node)
+
sqlquack census target/compiled/my_project/models --schema schema.json --builtin-policy
+Census of 25 snowflake SQL files
+  parsed 25 (25 statements), unparsed 0, empty 0
+  distinct constructs 21 (4 clause, 4 fn, 1 join, 12 node)
   files refused: missing rule 0, outside type conditions 0, unresolved name 0,
-    not expressible 0, parse fidelity 0, conversion budget 0, divergence refused 1
-  convertible: strict 2 …, unit-testable 2 …
+    not expressible 0, parse fidelity 0, conversion budget 0, divergence refused 2
+  convertible: strict 23 …, unit-testable 23 …
 
 Refusals by category and construct (top 50)
-       1  a known divergence the policy refuses: fn:HASH
+ 2 a known divergence the policy refuses: fn:SUM
diff --git a/website/src/content/docs/docs/cli/census.mdx b/website/src/content/docs/docs/cli/census.mdx index 57ce2ecdb..3798cc998 100644 --- a/website/src/content/docs/docs/cli/census.mdx +++ b/website/src/content/docs/docs/cli/census.mdx @@ -15,8 +15,8 @@ sqlquack census [OPTIONS] ... ``` ```bash -sqlquack census target/compiled/my_project/models --schema schema.json -sqlquack census target/compiled --schema schema.json --chain-models --json +sqlquack census target/compiled/my_project/models --schema schema.json --builtin-policy +sqlquack census target/compiled --schema schema.json --chain-models --json --builtin-policy ``` Each `.sql` file is one query, or one model compiled by @@ -26,16 +26,16 @@ recognised. A directory is searched for `.sql` files. Compiled models name relat they resolve. ```console -$ sqlquack census target/compiled/my_project/models --schema schema.json -Census of 3 snowflake SQL files - parsed 3 (3 statements), unparsed 0, empty 0 - distinct constructs 15 (2 clause, 4 fn, 9 node) - files refused: missing rule 0, outside type conditions 0, unresolved name 0, not expressible 0, parse fidelity 0, conversion budget 0, divergence refused 1 - convertible: strict 2 (every model upstream converts too), unit-testable 2 (the file's own SQL converts; 0 with an upstream model refused or not scanned) - with no named assumption: strict 2, unit-testable 2 (relying on one: none) +$ sqlquack census target/compiled/my_project/models --schema schema.json --builtin-policy +Census of 25 snowflake SQL files + parsed 25 (25 statements), unparsed 0, empty 0 + distinct constructs 21 (4 clause, 4 fn, 1 join, 12 node) + files refused: missing rule 0, outside type conditions 0, unresolved name 0, not expressible 0, parse fidelity 0, conversion budget 0, divergence refused 2 + convertible: strict 23 (every model upstream converts too), unit-testable 23 (the file's own SQL converts; 0 with an upstream model refused or not scanned) + with no named assumption: strict 23, unit-testable 23 (relying on one: none) Refusals by category and construct (top 50) - 1 a known divergence the policy refuses: fn:HASH + 2 a known divergence the policy refuses: fn:SUM ``` The report holds counts and construct names only, never SQL text or file names. `--names` adds diff --git a/website/src/content/docs/docs/cli/convert.mdx b/website/src/content/docs/docs/cli/convert.mdx index 2da414bc7..36710f557 100644 --- a/website/src/content/docs/docs/cli/convert.mdx +++ b/website/src/content/docs/docs/cli/convert.mdx @@ -15,7 +15,7 @@ sqlquack convert [OPTIONS] [PATH] ``` ```bash -sqlquack convert query.sql --schema schema.json +sqlquack convert query.sql --schema schema.json --builtin-policy echo "SELECT 1 AS total" | sqlquack convert --builtin-policy --json ``` diff --git a/website/src/content/docs/docs/cli/function.mdx b/website/src/content/docs/docs/cli/function.mdx index 75cc85743..da9380ddf 100644 --- a/website/src/content/docs/docs/cli/function.mdx +++ b/website/src/content/docs/docs/cli/function.mdx @@ -15,7 +15,7 @@ sqlquack function --name --schema [OPTIONS] ``` ```bash -sqlquack function --name NET_TOTAL --schema schema.json net_total.sql +sqlquack function --name NET_TOTAL --schema schema.json --builtin-policy net_total.sql ``` `BODY` is the file holding the function's body: a scalar function's expression, or a table diff --git a/website/src/content/docs/docs/cli/index-command.mdx b/website/src/content/docs/docs/cli/index-command.mdx index 78437cf2a..d8b1c734f 100644 --- a/website/src/content/docs/docs/cli/index-command.mdx +++ b/website/src/content/docs/docs/cli/index-command.mdx @@ -16,7 +16,7 @@ sqlquack index [OPTIONS] [PATHS]... ``` ```bash -sqlquack index models --schema schema.json --json +sqlquack index models --schema schema.json --json --builtin-policy ``` Every list is sorted, so the output for two revisions can be diffed to see which files a change to