On this page
Kater CLI Build an analysis query
kater query card
Turns a saved query into an Explore card.
The card takes the query’s chart to another workspace over the same shared model. It holds the query’s fields, with each filter the chart applies written in as a condition. It saves nothing.
Examples
# Turn the spend_by_platform query into a card, with the request in card.jsonkater query card --request-file card.json# Turn the paid_media_spend_trend query into a card for the last 6 complete monthsecho '{"namespace": {"path": "connections/snowflake_prod_connection/workspaces/ad_reporting"}, "document": {"path": "connections/snowflake_prod_connection/workspaces/ad_reporting/query_contracts/paid_media_spend_trend.sql"}, "inputs": {"parameters": {"is_within_last__union__date_day": 6}, "filters": ["is_within_last__union__date_day"]}}' | kater query card --request-file -Arguments
Options
It also takes the global options --json, --kater-root, --scope and --help.
The request
{"namespace": {"path": "connections/snowflake_prod_connection/workspaces/ad_reporting"}, "document": {"path": "connections/snowflake_prod_connection/workspaces/ad_reporting/query_contracts/spend_by_platform.sql"}}| Key | What it holds |
|---|---|
namespace | The query’s workspace, by its path from the content root. |
document | The query’s file, as {"path": ...} from the content root. |
inputs | What the chart runs with: parameters gives the parameter values, and filters lists the filters to turn on. Without it, the query’s own filters keep their defaults, and no workspace filter is carried. |
title | The card’s title. Without it, the query’s label. |
kind | The chart’s type, which the card keeps where its fields fill it. Without it, Kater charts the card as its fields suit best. |
leave | Fields that the other workspace’s filters hold rows by. A condition on one of them stays behind, because the chart follows that workspace’s filter. |
What it answers
card is the Explore card. Add it to another workspace with kater explore card add. carried names, by label, the workspace filters that the card holds as its own conditions.
Kater refuses a query whose workspace adds fields or joins of its own to the shared model. To open a query in the Sandbox with its workspace, use kater query sandbox.