On this page
Kater CLI Explore and try ideas explore card
kater explore card create
Makes a new card from fields you select on a shared model, and gives its query and chart.
Use it when no card of the tour shows what you need. Nothing is saved, and nothing runs on the warehouse.
Examples
# Make a card of spend by platform on the ad_reporting modelkater explore card create --request-file new-card.json# Make the card and keep the answer as JSON, to use its card in later requestskater explore card create --request-file new-card.json --json > created.jsonOptions
It also takes the global options --json, --kater-root, --scope and --help.
What the request holds
namespaceandsource. The shared model, as The request file shows.fields. The fields to show, from 1 to 24. Each names a field of the model infield, as a query writes it, such assum__spend. It can also give oneoperationfrom the field’s menu, with itsparameters.conditions. The conditions the rows must meet. Each gives afield, anoperationsuch asis_one_of, and itsparameters.order. How to sort the rows. Each gives a field the card shows, anddescendingto sort from largest.limit. The most rows, from 1 to 10,000.kind. The chart kind, such asbarorline, when the fields can fill it. Left out, Kater selects the chart that suits the fields best.include_fields. Set it totrueto also list the model’s fields that the card can add, each with its menu.
This file makes a card of spend by platform, largest first:
{"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"}}}, "fields": [{"field": "platform"}, {"field": "sum__spend"}], "order": [{"field": "sum__spend", "descending": true}]}The answer gives the card as card, its SQL as query_sql, its chart as definition, and its fields and conditions. Put its card in the requests of the other card commands.