On this page
Kater CLI Find and understand model
kater model fields
Lists the fields of the model you are editing, and the fields of the models it can read.
It shows them as the field picker does. The model’s own fields come under ACTIVE, then each model it can read under SELECT FROM. Use it to find the field to add to a query or a model.
Examples
# Go to the snowflake_prod_connection connectioncd connections/snowflake_prod_connection# List the fields of the spend_by_platform query, and the fields it can addkater model fields --document workspaces/ad_reporting/query_contracts/spend_by_platform.sql# List the fields that the ad_reporting workspace can readkater model fields --scope workspaces/ad_reporting# List the fields of the connection's shared modelskater model fields --scope modeling# List the fields of the connection's database datasetskater model fields --scope modeling/db_objectsOptions
It also takes the global options --json, --kater-root, --scope and --help.
What it lists
ACTIVEshows the model you are editing, with its own fields. It is empty when no model is selected.SELECT FROMshows each model it can read, with its fields.- Each field of a model it can read has a mark.
[ready]means that you can add it, and[present]means that the model has it already.[blocked]means that you cannot add it, and gives the reason.
With no option, it lists the fields for the model that kater scope use saved. With no saved scope, it uses the folder you are in.
What a model can read
What a model can read depends on its layer. See How modeling works.
- A Kater dataset reads its database dataset.
- A semantic model reads Kater datasets and other semantic models.
- A workspace’s root reads its one shared model.
- A query reads its workspace’s root, then the other queries in the same workspace.
A workspace is named by its full path. The path holds its connection and, for a personal workspace, its owner, such as connections/snowflake_prod_connection/users/you@example.com/workspaces/marketing_sessions.