Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions website/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,16 @@ <h3>See what a whole project needs</h3>
<p>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.</p>
<p class="more"><a href="/docs/cli/census/">Run a census →</a></p>
</div>
<pre class="terminal"><span class="cmd">sqlquack census target/compiled/my_project/models --schema schema.json</span>
Census of 3 snowflake SQL files
parsed 3 (3 statements), unparsed 0, empty 0
distinct constructs 15 (2 clause, 4 fn, 9 node)
<pre class="terminal"><span class="cmd">sqlquack census target/compiled/my_project/models --schema schema.json --builtin-policy</span>
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 <span class="dim">…</span>, unit-testable 2 <span class="dim">…</span>
not expressible 0, parse fidelity 0, conversion budget 0, divergence refused 2
convertible: strict 23 <span class="dim">…</span>, unit-testable 23 <span class="dim">…</span>

Refusals by category and construct (top 50)
1 a known divergence the policy refuses: fn:HASH</pre>
2 a known divergence the policy refuses: fn:SUM</pre>
</div>

<div class="step">
Expand Down
20 changes: 10 additions & 10 deletions website/src/content/docs/docs/cli/census.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ sqlquack census [OPTIONS] <PATHS>...
```

```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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/docs/cli/convert.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/docs/cli/function.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sqlquack function --name <NAME> --schema <SCHEMA> [OPTIONS] <BODY>
```

```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
Expand Down
2 changes: 1 addition & 1 deletion website/src/content/docs/docs/cli/index-command.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading