Skip to main content
On this page

Kater CLI Make and compare new

kater new scratch

Makes an empty scratch file in your brainstorm folder, ready for your statements.

It goes at the top of the folder, or in a folder you name. Then add statements, and run them with kater show --select or kater run --select.

Examples

Terminal window
# Create a scratch file at the top of your brainstorm folder
kater new scratch --connection snowflake_prod_connection
# Create one in the sandbox folder, with a name and a label
kater new scratch --connection snowflake_prod_connection --folder sandbox --name ad_spend_profiling --label "Ad spend profiling"
# Show the draft of the file, and create nothing
kater new scratch --connection snowflake_prod_connection --folder sandbox --dry-run

Options

OptionDescription
--connection <name>The connection whose brainstorm folder it goes in, by its folder name under connections/. Left out, the connection that --scope names, the one your saved scope is in, or your only one.
--folder <folder>A folder in your brainstorm folder to create it in, such as sandbox or a topic’s folder. Left out, it goes at the top.
--name <name>The file’s name, without .sql. Left out, it is unnamed_scratch_<n>, numbered across your whole brainstorm folder. A name that the folder already has is refused, never numbered.
--label <text>The name people see. Left out, the label says when the file was made.
--description <text>What the file is for.
--dry-runShows the draft of the file, and writes nothing.

It also takes the global options --json, --kater-root, --scope and --help.

See also