Skip to main content
On this page

Kater CLI Find and understand model

kater model check-join

Checks one of a model's joins on your warehouse, by counting the rows that match.

It says whether the rows fit the cardinality that the join declares, and which cardinality fits them best. It changes no file.

Examples

Terminal window
# Go to the connection's shared models
cd connections/snowflake_prod_connection/modeling
# Check the lifecycle_profile join of the marketing_sessions model
kater model check-join kater_objects/semantic_models/marketing/MARKETING_SESSIONS.sql --relationship lifecycle_profile
# Run the check on the warehouse again, in place of the kept answer
kater model check-join kater_objects/semantic_models/marketing/MARKETING_SESSIONS.sql --relationship lifecycle_profile --again

Arguments

ArgumentDescription
<path>Optional. The model’s file.

Options

OptionDescription
--relationship <name>Required. The join to check, by the name in its RELATIONSHIP(...), such as lifecycle_profile.
--model <model>The model, for a file that declares several, or in place of PATH.
--text-file <file>Text to read the join from, in place of the saved file. Kater still reads it as the file at PATH. - reads stdin.
--againRuns the check on the warehouse again, in place of the answer that Kater kept.

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

What the check says

  • How many rows of the model’s earlier source match the joined model, and the most rows that one row matches.
  • How many rows and key values the joined model has, and whether it has one row for each key value.
  • Whether the rows fit the declared cardinality, such as many to one. When they do not, it says what they are. When a closer cardinality fits, it says so.
  • When the check ran, and whether the answer is one that Kater kept.

Kater keeps a check until the model’s SQL changes. See Relationships and joins.

See also