On this page
Kater CLI Present and share chart
kater chart preview
Draws a chart that is not saved from the rows a query run already kept.
It does not reach the warehouse, so use it to try a chart quickly. Give it the id of a snapshot from kater chart snapshot.
Examples
# Keep the spend_by_platform rows from its last run in a filekater chart snapshot --request-file spend_by_platform.json --json > spend_by_platform_snapshot.json# Keep the spend_mix chart in a filekater chart read --request-file spend_mix.json --json > spend_mix_read.json# Make a preview request from the chart and the snapshot's idjq --slurp '{spec: .[0].definition.spec, sql: .[0].definition.sql, snapshot_id: .[1].snapshot.id}' spend_mix_read.json spend_by_platform_snapshot.json > spend_mix_preview.json# Draw the chart from those rowskater chart preview --request-file spend_mix_preview.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. |
snapshot_id | The id of the snapshot, from kater chart snapshot. |
inputs | Optional. The query’s parameter values and filters. |
require_complete | Optional, false when you leave it out. True refuses to draw from part of the rows, with chart_complete_required. Some chart kinds always need every row. |
When it cannot draw
A preview draws only from kept rows. When a chart needs every row and the snapshot holds only some, run the chart with kater chart execute.