On this page
Kater CLI Build an analysis source
kater source rebase
Changes a query's or a chart's SQL to read its own workspace.
Use it after you paste SQL that reads the workspace’s shared model, such as a Catalog example. It also works for SQL that you copied from another workspace. Kater saves the file as kater source write does.
Examples
# Go to the snowflake_prod_connection connection in your local copy of Kater contentcd connections/snowflake_prod_connection# Make a query that reads semantic.ad_reporting read the ad_reporting workspace insteadkater source rebase workspaces/ad_reporting/query_contracts/clicks_by_platform.sql --move read_through# Make SQL copied from the ad_reporting workspace read the ad_reporting_review workspacekater source rebase users/you@example.com/workspaces/ad_reporting_review/query_contracts/spend_by_platform.sql --move move_namespace --from-workspace workspaces/ad_reportingArguments
Options
It also takes the global options --json, --kater-root, --scope and --help.
What it changes
read_throughis for SQL that reads the shared model the workspace selected, such asFROM semantic.ad_reportingfrom a pasted Catalog example. It then reads the workspace.move_namespaceis for SQL that you copied from another workspace. Its names then point at this file’s workspace.- A workspace’s own
workspace.sqlis refused. To change the model a workspace reads, usekater workspace source use. - It saves as
kater source writedoes, with the same checks and--expected-revision.