On this page
Kater CLI Present and share chart
kater chart execute
Runs a chart on the warehouse and answers with its rows and its drawing, as a dashboard tile does.
You give the chart’s spec with its SQL or its plan, so it runs a saved chart or one you changed. From the terminal, each call runs the chart on the warehouse.
Examples
# Keep the spend_mix chart in a filekater chart read --request-file spend_mix.json --json > spend_mix_read.json# Make a request that runs the chart as its dashboard tile does, with a small answerjq '{spec: .definition.spec, sql: .definition.sql, own_filters: true, include_runtime: false}' spend_mix_read.json > spend_mix_execute.json# Run the chart on the warehousekater chart execute --request-file spend_mix_execute.jsonArguments
Options
It also takes the global options --json, --kater-root, --scope and --help.
The request
| Field | What it holds |
|---|---|
spec | The chart, as the spec of kater chart read holds it. |
sql | The SQL that selects the query’s columns for the chart. Give sql or plan, not both. |
plan | The same selection in parts, as kater chart plan takes it. |
inputs | Optional. The query’s parameter values and filters. Without them, the chart’s saved inputs apply. |
own_filters | Optional. True turns on the query’s own optional filters, as a dashboard tile does. A filter whose parameter has no value stays off. |
include_runtime | Optional, true when you leave it out. The run’s contract, which explains each field, is most of the answer and is often over a megabyte. False leaves it out. |
fresh | Optional. True runs the query again before Kater draws the chart. From the terminal, each call runs on the warehouse anyway. |
first_rows | Optional. The most rows the answer carries, from 1 to 10000, where Kater keeps the rest. From the terminal, Kater keeps no result, so every row comes. |
What it shows
The answer holds the rows and the drawing in snapshot, the chart in definition, and the query’s file in query_document. refreshing is true when the rows are old and are being read again. Rows are old after 15 minutes, unless kater.config.yaml sets another time.
Too many rows
When the chart’s rows are too large for one answer, Kater refuses with chart_output_budget. Give the chart a row limit, as limit in its plan or LIMIT in its SQL, and try again.