On this page
Kater CLI Build and check test
kater test snapshot
Copies the warehouse rows that your tests read into DuckDB files on this machine.
Then kater test --local runs those tests with no warehouse credentials. The copy goes in .kater/test-snapshots/<connection>/ in your content root, and it is never committed.
Examples
# See which tables and dates the copy would hold, and read nothingkater test snapshot --select semantic.ad_reporting --dry-run# Copy the rows that the ad_reporting tests readkater test snapshot --select semantic.ad_reporting# Run the tests on the copy, with no warehouse credentialskater test --select semantic.ad_reporting --localOptions
It also takes the global options --json, --kater-root, --scope and --help.
What it copies
- One file for each database that the tests read, named after the database.
- Only the tests’ dates. A table whose rows reach the model’s date field keeps only the tests’ dates. That is from the earliest test’s start to the latest test’s end. Any other table, such as a currency lookup, is copied whole.
- Up to 200,000 rows for each table. Kater leaves out a larger table, and the tests that read it run on the warehouse.
Which tests the copy answers
After it copies, Kater runs each test on the copy and compares the result with what the test expects. A test that matches is one that the copy answers. Any other test runs on the warehouse only. A local run never takes the place of a warehouse run, because DuckDB accepts SQL that Snowflake refuses.