Skip to main content
On this page

Kater CLI Find and understand model

kater model search

Finds models and fields whose name, label, description, AI context, business questions or tags match some text.

The text is a regular expression, unless you give --literal. It reads only saved contracts, so nothing runs on the warehouse.

Examples

Terminal window
# Go to the connection's shared models
cd connections/snowflake_prod_connection/modeling
# Find the models and fields that mention spend
kater model search spend
# Find the ones that mention clicks or impressions
kater model search 'clicks|impressions'
# Find the exact text "cost per session", not a pattern
kater model search 'cost per session' --literal
# Find at most 20 matches, with upper and lower case exact
kater model search Spend --case-sensitive --limit 20

Arguments

ArgumentDescription
<query>The text to find. Kater reads it as a regular expression, unless you give --literal.

Options

OptionDescription
-s, --select <selection>Searches only the models it selects: a folder or a SQL file, a model by its name, its typed address, such as semantic.ad_reporting, or its id, or a method such as tag:team=marketing. 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.
--literalReads QUERY as plain text, not as a regular expression.
--case-sensitiveMatches upper and lower case exactly. Without it, case does not matter.
--limit <n>The most matches to list, from 1 to 1,000. The default is 200.

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

What a match shows

Each match names the model or the field, and the key that matched, such as description. It also gives the whole value, with the place of the text in it. When more matches remain than --limit allows, the answer has truncated set to true.

See also