Skip to main content
On this page

Kater CLI Build and check

kater parse

Reads and checks every model and test in your project, and writes the project's graph to target/manifest.json, as dbt parse does.

Use it in CI, or in a tool that needs to know what each file reads, without a run on the warehouse. A model whose compile is in your computer’s compile cache is not parsed again, so a second parse takes seconds.

Examples

Terminal window
# Go to your local copy of Kater content
cd kater-content
# Parse the whole project
kater parse
# Parse one workspace and the models it reads
kater parse --select connections/snowflake_prod_connection/workspaces/ad_reporting

Options

OptionDescription
-s, --select <selection>What to parse, such as a folder or tag:team=finance. Leave it out to parse the whole project. A manifest for --state must come from a parse of the whole project, since a node that it does not hold counts as new. See Selecting models. You can give it more than one time.
--exclude <selection>What to leave out of the selection, in the same words as --select. You can give it more than one time.
--state <state>What state:modified and state:new compare with: a folder that holds an earlier manifest.json, or git:REF, such as git:main.

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

What it prints

Found 10 models, 8 queries, 9 charts, 12 tests.
Parsed 3 models again and reused 24 from the compile store.
Wrote target/manifest.json.

“Models” counts every model that is not a query, a chart or a test: workspaces, semantic models and datasets. After you change one query, a parse reads again only that query and the charts and queries that read it. A model that did not compile is listed below, with its errors. With --json, it prints status, found, parsed, reused, manifest and failed.

The manifest

target/manifest.json has one entry in nodes for each model and test, by its unique_id:

  • unique_id is the model’s id, the one that kater model list shows. A test’s id is its file and its name, such as test:connections/snowflake_prod_connection/modeling/kater_objects/tests/ad_reporting.sql#clicks_impressions_by_platform.
  • resource_type is the kind: query, chart, workspace, semantic, kater_dataset, db_dataset or test.
  • name, path and tags are the model’s name, its file and its tags.
  • checksum is the SHA-256 of the model’s file.
  • depends_on.nodes lists the ids of the models it reads. A test reads the model that it tests.

The command exits with 0 when every model compiled, 1 when one did not, and 2 for a command that is not valid. It sends nothing to the warehouse and changes none of your files.

See also