On this page
Kater CLI Build an analysis filter
kater filter move
Moves a query's filter to its workspace's root, as Move to workspace does.
Every query of the workspace then has the filter. Each other query that writes the same condition reads the root’s filter in place of its copy. Run it without --write first: it shows what moves and what the check on the warehouse finds. See Promotion and verification.
Examples
# Go to the ad_reporting workspace in your local copy of Kater contentcd connections/snowflake_prod_connection/workspaces/ad_reporting# Show what moves and what the check finds, and write nothingkater filter move paid_media_spend_trend is_within_last__union__date_day# Move the filter, while it is still the proposal of that linekater filter move paid_media_spend_trend is_within_last__union__date_day --revision 9f2c41d7 --writeArguments
Options
It also takes the global options anywhere on the line, and --help.
What moves
A filter moves up only. No command moves a workspace filter down to one query, since every other query would lose it.
- Copies go. Another query of the workspace that writes the same condition, under any name, loses its copy, since it now reads the root’s filter. The line without
--writenames each copy by its label and its name, and the query by its label:Takes away the copy West only (west_only) from Top West. - A copy stays only where its rows need it. A required filter in the root covers every copy. An optional one covers an optional copy with the same switch. Any other copy stays, and the command says why:
Keeps the copy EMEA only (emea_only) in Top Emea. EMEA only is required, and EMEA is optional. A reader could switch it off. - The root has the condition already. When the root writes the same condition under another name, the command refuses the move and names the copy to remove.
- The rows stay. Before it writes, the command runs each query that the move reaches on your warehouse, before and after the move. When a query returns other rows, the command writes nothing.