Skip to main content
On this page

Kater CLI Find and understand model

kater model list

Lists the models you can read, with their files.

Each model shows its kind, its file, its id and whether its saved contract is current. Use it to find a model’s exact name or id before you run, explain or change it.

Examples

Terminal window
# Go to the ad_reporting workspace
cd connections/snowflake_prod_connection/workspaces/ad_reporting
# List the workspace's root, queries and charts
kater model list
# List only the models in the query_contracts folder
kater model list --select path:query_contracts
# List the models that have the topic tag advertising
kater model list --select tag:topic=advertising
# List one query by its typed address
kater model list --select query.spend_by_platform

Options

OptionDescription
-s, --select <selection>Lists only the models it selects: a folder or a SQL file, a model by its name, its typed address, such as query.spend_by_platform, or its id, or a method such as tag:team=marketing. Give a connection’s folder, or the content root, to list every model in it. See Selecting models. You can give it more than one time.
--exclude <selection>Leaves out the models it selects, in the same words as --select. You can give it more than one time.
--state <state>What state:modified and state:new compare with: a folder that holds an earlier manifest.json, or git:REF, such as git:main.

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

What each model shows

Kater prints the answer as JSON. Each item’s target holds these keys, and some more:

  • id: the id that --select takes, here and in kater run.
  • name, model_type and path: the model’s name, its kind and its file.
  • contract_availability: whether the model’s saved contract is current, failed or missing. A contract is what the model’s last compile saved, such as its fields, filters and parameters.

A whole connection, or the content root, leaves out the workspace copies in brainstorm folders. kater model describe also shows each model’s contract.

See also