Skip to main content
On this page

Kater CLI Find and understand model

kater model joinable

Lists the models that this model can join on fields it already has, best first.

Each one shows its address, and the alias and the keys that a new join would use. When its SQL proves the cardinality, it shows that too. It reads no warehouse and changes no file.

Examples

Terminal window
# Go to the connection's shared models
cd connections/snowflake_prod_connection/modeling
# List the models that client_analysis_inputs can join
kater model joinable kater_objects/semantic_models/marts/CLIENT_ANALYSIS_INPUTS.sql
# List only the ways to join the client keys dataset
kater model joinable kater_objects/semantic_models/marts/CLIENT_ANALYSIS_INPUTS.sql --source kater_dataset.dim_velir_ga4__client_keys

Arguments

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

Options

OptionDescription
--model <model>The model, for a file that declares several, or in place of PATH.
--source <model>Lists only the ways to join this model, by its address, such as kater_dataset.dim_velir_ga4__client_keys.

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

The order

  1. Proven keys first. The SQL of these models proves that they have one row for each key. Each one shows the cardinality that this gives.
  2. Id fields next. These are the models that match on their id fields. Their cardinality is not proven, so check the join with kater model check-join after you add it.

With --json, each one also has the relationship name that a new join would use. To add the join, use kater model edit with an add_relationship change.

See also