Skip to main content
On this page

Kater CLI Make and compare new

kater new options

Lists where a new model, query, app or scratch file can go, and what you can start it from.

Run it before a create command. It finds a folder that you can write to, a free name and the objects to copy.

Examples

Terminal window
# Go to a connection's folder in your local copy of Kater content
cd connections/snowflake_prod_connection
# See where a new semantic model can go, and the models it can start from
kater new options semantic_model --scope modeling
# See the tables that a new Kater dataset can read, and the ones that have a dataset
kater new options kater_dataset --scope modeling
# Check that a new query can go in the ad_reporting workspace
kater new options query --scope workspaces/ad_reporting
# Check that ad_reporting can take an app over the shared ad_reporting model
kater new options app --scope workspaces/ad_reporting --source-model semantic.ad_reporting

Arguments

ArgumentDescription
<scaffold-object>The kind of object you want to make: db_dataset, kater_dataset, semantic_model, workspace, query, chart, app or scratch.

Options

OptionDescription
--target-path <path>A place to check, such as a workspace for a query or a folder for a dataset. It must be in the same connection as --scope. Kater then shows it as the default place.
--active-path <path>The file you have open in your editor. For a DB dataset, its folder becomes the default place. For a chart, its query becomes the default query to read.
--search <text>Lists only the objects to copy whose name, label or path holds this text. Case does not matter.
--source-model <model>For a query, chart or app, the shared semantic model or Kater dataset that it reads. Give a name, a typed address such as semantic.ad_reporting, or identity JSON. Kater offers the workspace only when that workspace selected this model.
--include-duplicates, --no-include-duplicatesLists the workspaces or apps that you can copy, with their revisions. This is on by default. --no-include-duplicates leaves them out, for a caller that lists them a page at a time with kater invoke workspace.browse or app.browse. Copying stays offered.

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

Give a scope

The command needs --scope, the folder you work in. The scope that kater scope use saved does not count. The scope also sets which kinds you can ask about:

  • A folder in modeling/db_objects/: db_dataset.
  • modeling, or a folder in modeling/kater_objects/: kater_dataset, semantic_model or workspace.
  • A workspace: query, chart, app or workspace.
  • Any folder in the connection: scratch. A scratch file goes in your own brainstorm folder.

What it lists

  • targets: the places where the object can go, each with whether you can write there, and why not.
  • default_target and default_name: the place and the name that a create gets when you give neither, such as unnamed_query_1.
  • naming: the rule for a name.
  • capabilities: whether you can make a new one, or copy one. You can copy semantic models, workspaces, queries and apps.
  • duplicates: the objects that you can copy.
  • sources: for a semantic model, the shared models it can start from. For a workspace, the shared models it can select.
  • tables: for a Kater dataset, each table with a DB dataset, its column count, and the dataset that already reads it.
  • source_queries: for a chart, the queries that it can read.

One workspace at a time

For a query, chart or app, Kater reads only one workspace. That is the workspace that --target-path names, or the scope’s workspace. To list the other workspaces a page at a time, use kater invoke workspace.browse.

See also