Skip to main content
On this page

Kater CLI Build an analysis field

kater field show

Shows how a field of a query or a shared model is made, as its breadcrumbs in Kater say it: what it starts from, then each of its steps, joined by >.

Each field is named by its key, such as semantic.orders.revenue, and its id, fld1_…, which every field command takes. A field that a rename or a promotion moved is shown where it is now, and the answer says so. Each of the field’s own steps has the number that kater field edit --step takes.

Examples

Terminal window
# Go to the shop workspace in your local copy of Kater content
cd connections/duckdb_sample/workspaces/shop
# See how the running sum of revenue is made
kater field show monthly_revenue --field running_sum__sum__amount
# See how every field of the query is made
kater field show monthly_revenue
# See a shared model's field by its key, with its id
kater field show semantic.orders.revenue

Arguments

ArgumentDescription
<place>The field, as <model>.<field>, such as semantic.orders.revenue, its kater:// reference or its id, fld1_…; or the place it is on, as for kater field values. Never a file. A model’s name that two connections hold is read in the connection of --scope, else of where you work.

Options

OptionDescription
--field <name>A field of the place, by its SQL name or its id. Give it again for each field. Without it, every field of the place. You can give it more than one time.
--readsEvery field the query reads anywhere instead: its outputs, its filters and other clauses, its steps (CTEs) and its parameters, each with the model it comes from or the step that makes it, how it was made, whether it is verified, and where the query reads it. With a workspace as the first argument, each of the workspace’s queries in one call.

It also takes the global options anywhere on the line, and --help.

How it works

It reads the query as it is saved in your local copy, and nothing is saved. A date or timestamp that can be shown by a timeframe also lists them, as Timeframes: Month, Quarter, Year, with the date’s own grain first. With --json it gives each field’s breadcrumbs as one line and as a sentence, each of its own steps with its operation and its choices, and its timeframes.

See also