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
# Keep the spend_mix chart in a filekater chart read --request-file spend_mix.json --json > spend_mix_read.json# Make a save request that draws the pie chart as a donutjq '{spec: (.definition.spec | .presentation.donut = true), sql: .definition.sql, expected_revision: .definition.revision}' spend_mix_read.json > spend_mix_save.json# Save the changekater chart save --request-file spend_mix_save.jsonArguments
Options
It also takes the global options --json, --kater-root, --scope and --help.
The request
| Field | What it holds |
|---|---|
spec | The whole chart, as the spec of kater chart read holds it, with your changes. |
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. |
expected_revision | The 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.