Skip to main content
On this page

Kater CLI Explore and try ideas explore

kater explore

Finds ready-made analyses for a shared model, and saves the ones you want to a workspace.

Explore reads one shared model: a semantic model or a Kater dataset of the shared layer. Its cards are charts with the queries that answer them. You read them, change them, run them, and save the ones you keep. Nothing in a workspace goes back into Explore.

Commands

CommandWhat it does
kater explore tourRead a model’s Explore tour.
kater explore cardMake, change, run and save Explore cards.
kater explore definitionRead and save a model’s Explore questions and plans.
kater explore previewRead a card preview’s progress, or stop it.
kater explore use-casePlan the cards that answer a model’s questions.

Select the model

The commands that read a model take it in one of two ways:

  • A name and a scope. Give the model by its name or its typed address, such as semantic.ad_reporting. kater explore tour takes it as its first argument, and the other commands take --model. Give --scope with it: the connection’s modeling folder, such as connections/snowflake_prod_connection/modeling.
  • A request file. --request-file takes the whole request as JSON, from a file. - reads stdin. The commands that work on cards and previews take only a request file.

--scope is a path from the content root. Run these commands from the content root, or give --kater-root.

The request file

A request names its model with namespace and source. namespace is the connection’s shared layer. source is the model’s file and its identity. This file names the ad_reporting model. kater explore tour, kater explore definition show and kater explore use-case list take it as it is:

source.json
{"namespace": {"kind": "shared", "connection": "snowflake_prod_connection"}, "source": {"path": "connections/snowflake_prod_connection/modeling/kater_objects/semantic_models/marts/AD_REPORTING.sql", "identity": {"name": "AD_REPORTING", "model_type": "semantic", "namespace": {"kind": "shared", "connection": "snowflake_prod_connection"}}}}

Cards

A card is one JSON object: a question, the query that answers it, and its chart. kater explore tour --json gives the cards of each section under sections, in its cards. kater explore card create and kater explore card edit give one card as card.

  • A request about one card holds it as card, and the card’s own workspace as namespace. On these pages, card.json is such a request.
  • A request about several cards holds them as cards, with the workspace they all share as namespace.
  • Nothing is saved until kater explore card add saves cards to a workspace. kater explore card open copies a card’s query to a scratch file.

Examples

Terminal window
# Read the tour of the ad_reporting shared model
kater explore tour semantic.ad_reporting --scope connections/snowflake_prod_connection/modeling
# List the questions the model answers, and whether each has a plan
kater explore use-case list --model semantic.ad_reporting --scope connections/snowflake_prod_connection/modeling
# Run the card in card.json on the warehouse and wait for its chart
kater explore card preview --request-file card.json
# Save the cards in add.json to a workspace as queries and charts
kater explore card add --request-file add.json

See also