Skip to main content
On this page

Kater CLI Present and share chart

kater chart save

Saves your changes to a saved chart.

Give the whole chart, its spec with its SQL or its plan, and the revision you read. Kater refuses the save when the chart changed after you read it, and writes nothing when nothing changed.

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 save request that draws the pie chart as a donut
jq '{spec: (.definition.spec | .presentation.donut = true), sql: .definition.sql, expected_revision: .definition.revision}' spend_mix_read.json > spend_mix_save.json
# Save the change
kater chart save --request-file spend_mix_save.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 changed chart, as JSON, with the revision you read. 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 whole chart, as the spec of kater chart read holds it, with your changes.
sqlThe SQL that selects the query’s columns for the chart. Give sql or plan, not both.
planThe same selection in parts, as kater chart plan takes it.
expected_revisionThe chart’s revision from kater chart read.

Names

A save keeps the chart’s name. Kater refuses a save that changes it. A chart takes its name from its label: to rename a chart, send its new label with kater invoke label.set, with the chart as its target. Kater makes the name from the label and renames the chart, and each dashboard tile that shows it, in the same change.

See also