Skip to main content
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

Terminal window
# Keep the spend_mix chart in a file
kater chart read --request-file spend_mix.json --json > spend_mix_read.json
# Make a request that draws the pie chart as a donut
jq '{spec: (.definition.spec | .presentation.donut = true), sql: .definition.sql}' spend_mix_read.json > spend_mix_donut.json
# Check the change, and save nothing
kater chart plan --request-file spend_mix_donut.json

Arguments

ArgumentDescription
<path>Optional. In place of --request-file: the workspace, the query file or the chart file the request names.

Options

OptionDescription
--request-file <file>The chart, as JSON: its spec, and its SQL or its plan. Give - to read it from standard input. See The request.

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

The request

FieldWhat it holds
specThe chart, as the spec of kater chart read holds it.
sqlThe SQL that selects the query’s columns for the chart. Give sql or plan, not both.
planThe same selection in parts: source, projections (each column’s field and alias), distinct, conditions, order and limit, from 1 to 100000 rows.
expected_revisionOptional. 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.

See also