Skip to main content
On this page

Kater CLI Find and understand model

kater model explain

Explains how a model's fields are computed, field by field.

Use it to learn what a measure adds up, what it filters and which columns it reads. Nothing runs on the warehouse, and no file changes.

Examples

Terminal window
# Go to the connection's shared models
cd connections/snowflake_prod_connection/modeling
# Explain how the Spend measure of the ad_reporting model is computed
kater model explain sum__spend --relation semantic.ad_reporting
# Explain every field that the ad_reporting model declares
kater model explain --relation semantic.ad_reporting
# Show only the formula of the Spend measure
kater model explain sum__spend --relation semantic.ad_reporting --density signature
# Also show how each model on the way computes it, step by step
kater model explain sum__spend --relation semantic.ad_reporting --density page

Arguments

ArgumentDescription
<field>Optional. The field to explain, by its exact name in --relation, such as sum__spend. Leave it out to explain every field that the model declares or passes through, measures first.

Options

OptionDescription
--relation <model>Required. The model that holds the field, by its name or typed address, such as semantic.ad_reporting.
--path <file>A SQL file to look from. Kater finds --relation among the models that this file can read.
--density <level>How much to show. signature shows only the formula. card shows the field’s definition card. page adds how each model on the way computes the field, step by step. The default is card.

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

What an explanation shows

For each field, it shows what you can group or filter it by, and what it requires. It also shows its formula, the columns it reads, the joins and filters it adds, and its format. Without --json, the explanation is Markdown text.

See also