Skip to main content
On this page

Kater CLI Explore and try ideas explore card

kater explore card edit

Changes one thing on a card, and gives the card planned again.

A change to its fields works as the same click in the field picker works on a query. Nothing is saved.

Examples

Terminal window
# Make the change in edit.json to its card
kater explore card edit --request-file edit.json
# Run the changed card on the warehouse and wait for its chart
kater explore card preview --request-file card.json

Options

OptionDescription
--request-file <file>Required. The card and one change, as JSON, from a file. - reads stdin. See What the request holds.

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

What the request holds

  • namespace and card. The card, as Cards says.
  • bindings and kind. The card’s fields by role (dimensions, values and columns), and its chart kind. Both are required. Send the card’s own to keep them. Put another field at the same position to replace one, or send another kind that its fields can draw.
  • change. One change to the card’s fields or to its chart, from the list below.
  • operation. Or a next step over the card’s results: an operation from a field’s menu. Send change or operation, not both.
  • inputs. The card’s parameter values and filters.

The changes

change has a kind, and the keys that kind takes:

  • add. Adds a field of the model (field), as it is or with an operation_id from its menu. An example is the sum of a number. It also adds a condition on a field the card does not show, such as a date range.
  • remove. Takes out the item at position, as kater explore card show lists them under picks.
  • operation. Applies an operation from the menu of a field the card shows (output), with its parameters. Examples are a date’s grain, Top 10 or a sort.
  • condition. Changes the condition at position to another filters.* operation (operation_id), with its parameters, such as 3 months in place of 12.
  • remove_condition. Takes out the condition at position.
  • limit. Sets the most rows (limit), or null for every row.
  • create_projection. Adds a field made from SQL over the model’s fields, as the field picker’s New Field makes one.
  • presentation. Replaces the chart’s settings: its title, description, style, and each metric’s mark and axis. With roles, it also sets which fields are on the chart, and in which role. The query does not change.

See also