Skip to main content
On this page

Kater CLI Explore and try ideas brainstorm

kater brainstorm copy

Copies a workspace into a topic of your brainstorm folder, so you can change the copy freely.

Then compare it with the original, and apply it when you like the result. It writes only in your brainstorm folder.

Examples

Terminal window
# Go to the snowflake_prod_connection connection
cd connections/snowflake_prod_connection
# Copy the ad_reporting workspace into the promote_roas topic of your brainstorm folder
kater brainstorm copy workspaces/ad_reporting --topic promote_roas
# Compare the copy with its original, query by query
kater compare --left workspaces/ad_reporting --right users/you@example.com/brainstorm/promote_roas/workspaces/ad_reporting
# See what applying the copy would write, and write nothing
kater workspace apply users/you@example.com/brainstorm/promote_roas/workspaces/ad_reporting --dry-run

Arguments

ArgumentDescription
<workspace>The workspace to copy, by its folder: from --kater-root, or else from your working folder. You can copy any workspace you can read in its connection, someone else’s included.

Options

OptionDescription
--topic <topic>Required. The brainstorm topic the copy goes in, in lower snake case, such as promote_roas. The copy goes in brainstorm/<topic>/workspaces/, the folder beside the topic’s note.
--name <name>The copy’s folder name. Left out, it is the name of the workspace it copies, so the two pair up by name in kater compare. A name that the topic already has is refused.

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

What the copy holds

  • A real workspace. Nothing outside your brainstorm folder reads it. copied-from.yaml names the original, and each file’s revision in the original and in the copy.
  • Apps stay behind. The original’s apps stay with it. Its default-inputs.json comes along, changed to name the copy’s queries. When none of its entries names a query of the copy, it stays behind.
  • It compiles once. The copy is saved even when it does not compile. The answer gives the copy’s path, how many files it copied, and that compile’s errors, by file. --json returns the workspace operation’s answer, whose copy_of holds them.
  • Names. A name that the topic already has is refused, never numbered.

After the copy

kater brainstorm show on the copy lists each file it changed since it was copied. kater compare checks that its queries give the answers you expect. kater workspace apply writes its changes to the original.

See also