Skip to main content
On this page

Kater CLI Build an analysis field

kater field

Changes the fields of a saved query, step by step, as the field form in Kater does.

kater new field adds a field. Each command shows the field’s Kater SQL and first rows before it saves anything.

Commands

CommandWhat it does
kater field editChange a field and preview it before it’s saved.
kater field previewWrite and run a field without saving it, and give the plan that saves it.
kater field optionsShow the next step of making a field: what to start with, what to turn it into, its settings.
kater field menuList what each field of a query offers, as its menu in the field picker does.

Examples

Terminal window
# Go to the ad_reporting workspace in your local copy of Kater content
cd connections/snowflake_prod_connection/workspaces/ad_reporting
# Make a field step by step, with Kater asking for each step
kater new field --path query_contracts/paid_media_spend_trend.sql
# Add the percent change of spend from the month before
kater new field --path query_contracts/paid_media_spend_trend.sql --from sum__spend --make previous_period --set output=percent_change --write
# Rank the platforms from the fewest conversions, and save the change
kater field edit --path query_contracts/which_platform_lead_on_conversions.sql --field rank__sum__conversions --set order_direction=asc --write

See also