Kater CLI Make and compare new
kater new workspace
Makes a new workspace that reads a shared model.
It goes in your own folder, or in the connection’s workspaces/ folder with --kind connection. The new workspace has no queries and no app until you add them.
Examples
# Make the spend_review workspace in your own folder, over the shared ad_reporting modelkater new workspace spend_review --connection snowflake_prod_connection --from-model semantic.ad_reporting# Make it in the connection's workspaces/ folder in place of your own folderkater new workspace spend_review --connection snowflake_prod_connection --kind connection --from-model semantic.ad_reporting# See what it writes, and save nothingkater new workspace spend_review --connection snowflake_prod_connection --from-model semantic.ad_reporting --dry-run# Give the new workspace a label and a descriptionkater new workspace spend_review --connection snowflake_prod_connection --from-model semantic.ad_reporting --label "Spend review" --description "Spend and conversions by platform"# Copy the ad_reporting workspace into your own folder as ad_reporting_reviewkater new workspace ad_reporting_review --connection snowflake_prod_connection --duplicate-from connections/snowflake_prod_connection/workspaces/ad_reportingArguments
Options
It also takes the global options --json, --kater-root, --scope and --help.
What it writes
Kater makes the workspace’s folder, with a workspace.sql file, a dashboard.yaml file and an empty query_contracts/ folder. It makes no query and no app.
- With
--from-model, the SQL inworkspace.sqlreads every field of the model. The workspace’s root keeps the workspace’s name, so a query in a workspace namedsalesreadsFROM workspace.sales, whatever model it reads. - Without
--from-model,workspace.sqlhas no SQL untilkater workspace source usegives the workspace a model. - A name that is taken is refused. Kater never adds a number to make it different.
Copying a workspace
--duplicate-fromcopies every file of the workspace. The queries and charts of the copy point at the new workspace.- Each app is copied with a new id, and you are its owner. A copied app still reads the queries of the original workspace.
- A copy refuses
--from-modeland--workspace-metadata. - A workspace in a brainstorm topic must be a copy. Make it with
kater brainstorm copy.
Check that nothing changed since a dry run
A --dry-run answer lists witnesses: the revisions of what the create reads. Give each one back to the create with its option, such as --source-revision. When one changed since the dry run, the create stops and asks you to make a new dry run. An option for a revision that a workspace create never reads stops the create for any value.