On this page
Kater CLI Present and share chart
kater chart plan
Checks a chart without saving it.
Kater reads the chart’s spec with its SQL or its plan, and answers with the chart as it would save it. It writes nothing, so use it to test a change before kater chart save.
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 draws the pie chart as a donutjq '{spec: (.definition.spec | .presentation.donut = true), sql: .definition.sql}' spend_mix_read.json > spend_mix_donut.json# Check the change, and save nothingkater chart plan --request-file spend_mix_donut.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: source, projections (each column’s field and alias), distinct, conditions, order and limit, from 1 to 100000 rows. |
expected_revision | Optional. The saved chart’s revision, from kater chart read. |
What it shows
The answer has the fields that kater chart read shows, such as the title, the SQL and the plan. The diagnostics list the problems Kater found.