Skip to main content
On this page

Kater CLI Build an analysis query

kater query fields

Lists every field that a new query in a workspace can show, with the operations that each field offers.

Use it to write the request for kater query new. It saves nothing.

Examples

Terminal window
# Go to the snowflake_prod_connection connection in your local copy of Kater content
cd connections/snowflake_prod_connection
# List the fields that a new query in the ad_reporting workspace can show
kater query fields workspaces/ad_reporting
# List only the measures
kater query fields workspaces/ad_reporting --kind measure
# List only the fields whose name, label, description or model holds the word spend
kater query fields workspaces/ad_reporting --search spend
# List the fields that a query reading the spend_by_platform query can show
kater query fields workspaces/ad_reporting --source query.spend_by_platform

Arguments

ArgumentDescription
<path>Optional. The workspace, by its folder. Leave it out to use the workspace that kater scope use saved.

Options

OptionDescription
--source <query>Lists the fields of another query of the workspace in place of the workspace’s own, as query.<name>, such as query.spend_by_platform. These are the fields that a query reading it can show, as the source key of kater query new takes it.
--search <text>Lists only the fields whose name, label, description or model holds all these words.
--kind <kind>Lists only one kind of field: dimension, measure or custom_calculation.
--from <model>Lists only the fields that come from this model, by the name that the listing gives it.

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

How to read the list

Fields that offer the same operations are listed together, under those operations. Each operation’s parameters are written one time. In a kater query new request, give a field’s name and at most one operation from its list. Add that operation’s parameters.

The list comes from what the workspace’s last compile stored. kater operation list, with a query file, --field and --operation, gives the whole parameter schema of one operation.

See also