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
| Command | What it does |
|---|---|
kater field edit | Change a field and preview it before it’s saved. |
kater field preview | Write and run a field without saving it, and give the plan that saves it. |
kater field options | Show the next step of making a field: what to start with, what to turn it into, its settings. |
kater field menu | List what each field of a query offers, as its menu in the field picker does. |
Examples
# Go to the ad_reporting workspace in your local copy of Kater contentcd connections/snowflake_prod_connection/workspaces/ad_reporting# Make a field step by step, with Kater asking for each stepkater new field --path query_contracts/paid_media_spend_trend.sql# Add the percent change of spend from the month beforekater 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 changekater field edit --path query_contracts/which_platform_lead_on_conversions.sql --field rank__sum__conversions --set order_direction=asc --write