On this page
Developers Command-line workflows
Check a query from the terminal
Check that the CLI reaches your Kater API and warehouse, list what a query reads, and preview its rows, in three commands.
This is the first thing to do in a new local copy, and the first thing to do when something looks wrong. If you know dbt, the commands work the same way: kater debug checks the setup, kater ls lists what a selection selects, and kater show previews rows.
The commands and their times are real. Long waits are shortened in the recording.
-
Check the setup.
Run
kater debugin your local copy. It checks the CLI, your profile and target, the project, the Kater API, your sign-in, each warehouse and the compile cache. It sendsselect 1to every warehouse at once, through the Kater API.Terminal window cd ~/katerkater debug15:02:37 Running with kater=0.1.0, profile=kater, target=dev (Kater API at http://127.0.0.1:8788)15:02:37 kater 0.1.0, Python 3.14.3 ............................................. [OK]15:02:37 Profile kater in ~/.kater/profiles.yml, target dev ........................ [OK]15:02:37 Project kater_project.yml at ~/kater ...................................... [OK]15:02:38 Kater API 0.1.0 at http://127.0.0.1:8788 .................................. [OK]15:02:38 Signed in as you@example.com .............................................. [OK]15:02:39 Waiting for 2 warehouses to answer select 1. 1s15:02:42 Warehouse duckdb_sample ................................................. [SKIP]15:02:42 Kater stores no credential for the connection duckdb_sample.15:02:42 Warehouse snowflake_prod_connection (select 1) ............................ [OK]15:02:42 Content root on main, 0 files changed ..................................... [OK]15:02:43 Compile cache ~/.cache/kater-query-server, 1.5 GB ......................... [OK]15:02:43 All checks passed!A
SKIPis a connection that has no stored credential yet. It does not fail the check. Your computer never holds a warehouse credential: every statement goes through your Kater API. -
List what a query reads.
kater lsprints one line for each model that a selection selects, and sends nothing to the warehouse. A+before the name adds everything the query reads.Terminal window kater ls --select +spend_by_platformdb_dataset.facebook_ads__account_reportdb_dataset.facebook_ads__ad_reportdb_dataset.google_ads__ad_reportdb_dataset.tiktok_ads__ad_reportkater_dataset.facebook_ads__account_reportkater_dataset.facebook_ads__ad_reportkater_dataset.google_ads__ad_reportkater_dataset.tiktok_ads__ad_reportsemantic.ad_reportingchart.spend_by_platformquery.spend_by_platformpath:connections/snowflake_prod_connection/workspaces/ad_reporting/workspace.sql,workspace.ad_reportingEach line is a selection that you can give to
--selectas it is. A model whose kind and name are used two times, as two connections can each have a workspacead_reporting, also names its file. Add--output pathto see each file, or--output jsonfor the whole node. -
Preview the rows.
kater showruns one query on the warehouse and prints its first rows, with the column names the query gives them.Terminal window kater show --select query.spend_by_platform --limit 5Previewing node 'spend_by_platform':| PLATFORM | UNION__CURRENCY | SUM__SPEND || ------------ | --------------- | ---------- || facebook_ads | USD | 876034.94 || google_ads | USD | 1627324.59 || tiktok_ads | USD | 232346.09 |
kater debugends with “All checks passed!”.kater ls --select +NAMElists the query and the models it reads.kater show --select query.NAME --limit 5prints rows with named columns.
If something looks wrong
| You see | What to do |
|---|---|
Kater could not reach the Kater API at URL. | The Kater API is not running, or the target’s api_url is wrong. Check the target in ~/.kater/profiles.yml, then run kater debug again. |
You are not signed in to the Kater API at URL. | Run kater login. |
Warning: --select spend_by_platfrom matches no object. Did you mean spend_by_platform? | The name has a typo. Use the name it suggests. |
A line such as Waiting for Kater to read the project. 11s | Kater reads the project’s files before it selects. The first time after a large change, this can take some seconds. The line shows that it still works. |
--select facebook_ads__account_report selects 2 models | kater show shows one model. Give its typed address, such as kater_dataset.facebook_ads__account_report. |
Next steps
- Change a query and build it
- Test a shared model
- Selecting models, for every form that
--selecttakes kater debug,kater lsandkater show