On this page
Kater CLI Build an analysis source
kater source patch
Changes single properties at the top of a Kater file, in place, such as a query's label.
Every other line stays as written, comments included. Use it in place of a whole-file write when you change only a few keys.
Examples
# Go to the ad_reporting workspace in your local copy of Kater contentcd connections/snowflake_prod_connection/workspaces/ad_reporting# Set the label of the spend_by_platform querykater source patch query_contracts/spend_by_platform.sql --edits '[{"at": "label", "value": "Spend by platform"}]'# Make the workspace's first parameter, reporting_date, default to 6 monthskater source patch workspace.sql --edits '[{"at": "parameters[0].default_value", "value": 6}]'# Take out the workspace's descriptionkater source patch workspace.sql --edits '[{"at": "description", "value": null}]'# Give the paid_media_performance app the spring themekater source patch apps/paid_media_performance/kater.app.yaml --edits '[{"at": "application.theme", "value": "spring"}]'# Read the edits from edits.json in place of the command linekater source patch query_contracts/spend_by_platform.sql --edits-file edits.jsonArguments
Options
It also takes the global options --json, --kater-root, --scope and --help.
How it changes the file
- In order. Kater makes the edits in the order of the list.
- What Kater writes is refused. Kater refuses a property that it writes itself, such as a model’s
nameor an app’s id, and says why. - How it saves. It saves as
kater source writedoes, with the same checks.connection.yamlsaves askater admin connection updatedoes. - Its old name is
kater source frontmatter.