Skip to main content
On this page

Kater CLI Find and understand operation

kater operation search

Finds the operations whose names or categories hold some words, such as display or lag, across a model's fields.

It takes the same options as kater operation list. Add --field and --operation to see one operation’s parameters and target.

Examples

Terminal window
# Go to the ad_reporting workspace
cd connections/snowflake_prod_connection/workspaces/ad_reporting
# Find the operations whose names hold the word lag
kater operation search lag query_contracts/spend_by_platform.sql
# Find the previous period operations of the Spend field
kater operation search 'previous period' query_contracts/spend_by_platform.sql --field sum__spend

Arguments

ArgumentDescription
<query>The words to find in operation names and categories. Case does not matter, and an operation must hold every word.
<path>Optional. The model’s file. Or a workspace folder, with --model to select the model in it. Give PATH, --model or both.

Options

OptionDescription
--model <model>The model, for a file that declares several, or in place of PATH, such as query.spend_by_platform.
--text-file <file>Text to read in place of the saved file, such as an editor’s unsaved changes. Kater still reads it as the file at PATH. - reads stdin.
--at <line>:<character>The cursor’s place in the file, counted from 0, in UTF-16 code units. Kater selects the model at that place.
--field <field>Searches only this field’s operations, by the field’s name. Write alias.name for a field of a model that this one reads. Kater compares names as the connection’s warehouse compares them.
--fields-of <fields>Whose fields to search. Give active for the model’s own fields, source for the fields of the models it reads, or all for both. The default is all.
--family <family>Searches only the operations of this family: aggregations, calculate_at, comparisons, derive, field, filter_by_this_number, filters, format, sort, timeframes or windows.
--operation <id>One operation of --field, such as windows.lag. It shows the operation’s parameters, the target that kater model edit --operations takes, and the fields each choice offers. It needs --field.

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

See also