Kater CLI Build an analysis filter
kater filter add
With --is-one-of or --is-not-one-of, --from-file reads IDs from a UTF-8 file of at most 1,000,000 bytes.
New lines, commas, spaces and tabs separate them, blank entries are dropped and repeated IDs are kept once. The file works for a key or a field with no key. An empty or unreadable file is refused. The value check reports how many IDs it found, and --allow-unseen keeps a value no row holds only when you ask for that.
Adds a filter on a field with one condition, as the + on the query does. With --workspace, it adds the filter to the workspace’s root, so every query of the workspace has it. A new filter starts on.
Examples
kater filter add orders_by_id order_id --is-one-of --from-file ids.txtkater filter add orders_by_id order_id --is-one-of --from-file ids.txt --write# Go to the ad_reporting workspace in your local copy of Kater contentcd connections/snowflake_prod_connection/workspaces/ad_reporting# Show the SQL that the filter writes, and write nothingkater filter add paid_media_spend_trend platform --is-one-of Google Meta# Add the filterkater filter add paid_media_spend_trend platform --is-one-of Google Meta --write# Add a date filter for every query of the workspacekater filter add paid_media_spend_trend date_day --is-on-or-after '3 months ago' --workspace --write# Add a required filter, which a reader cannot switch offkater filter add paid_media_spend_trend spend --is-at-least 0 --required --label "Spend is known" --writeArguments
Options
It also takes the global options anywhere on the line, and --help.