Skip to main content
On this page

Kater CLI Share and administer admin connection

kater admin connection update

Changes a connection's settings, schemas or tables in its connection.yaml.

Only what you give changes, and Kater tests new warehouse settings before it saves them. It never changes modeling/, so run kater sync --resource-type db_dataset after you change the schemas or tables.

Examples

Terminal window
# Take a schema out of the connection's selection
kater admin connection update snowflake_prod_connection --remove-schema DEMO_DB.ANALYTICS_VELIR_GA4
# Put the schema back in the selection
kater admin connection update snowflake_prod_connection --add-schema DEMO_DB.ANALYTICS_VELIR_GA4
# Never sync one table of a schema
kater admin connection update snowflake_prod_connection --exclude-table DEMO_DB.ANALYTICS_AD_REPORTING.AD_REPORTING__URL_REPORT
# Sync that table again
kater admin connection update snowflake_prod_connection --include-table DEMO_DB.ANALYTICS_AD_REPORTING.AD_REPORTING__URL_REPORT
# Set a database's timezone and the query timeout
kater admin connection update snowflake_prod_connection --timezone DEMO_DB=America/Los_Angeles --query-timeout 600
# Print the new connection.yaml, and save nothing
kater admin connection update snowflake_prod_connection --label "Snowflake production" --dry-run

Arguments

ArgumentDescription
<connection-name>The connection to change, such as snowflake_prod_connection.

Options

OptionDescription
--label <text>Sets the connection’s label, the name that people read.
--description <text>Sets the connection’s description, for notes about it.
--query-timeout <seconds>Sets query_timeout, the seconds that a query may run. Kater records it, but does not use it yet.
--query-timezone-conversion <text>Sets query_timezone_conversion. Kater records it, but does not use it yet.
--dry-runPrints the new connection.yaml, and saves nothing.
--expected-revision <revision>The revision of connection.yaml that you checked, as revision in the output of kater admin connection show. The update stops when the file changed after that revision.
--add-schema <database.schema>Adds a schema to the selection, such as DEMO_DB.ANALYTICS_VELIR_GA4. A database that the file does not read yet is added, in UTC. You can give it more than one time.
--remove-schema <database.schema>Takes a schema out of the selection. Its dataset files stay until kater sync --resource-type db_dataset --prune runs. You can give it more than one time.
--add-table <database.schema.table>Adds a table to a schema’s list of tables. A schema with a list reads only its listed tables, so the first table that you add narrows the schema. You can give it more than one time.
--remove-table <database.schema.table>Takes a table out of a schema’s list. You cannot remove the last table, because an empty list reads every table. Use --exclude-table or --remove-schema instead. You can give it more than one time.
--exclude-table <database.schema.table>Adds a table to the schema’s exclude_tables, which Kater never syncs. Then run kater sync --resource-type db_dataset --prune. You can give it more than one time.
--include-table <database.schema.table>Takes a table out of the schema’s exclude_tables, so Kater syncs it again. It does not change the schema’s list of tables: --add-table does. A schema with no list syncs every table except the ones in exclude_tables, and the portal’s Select schemas writes exclude_tables when you clear some tables of a schema. You can give it more than one time.
--timezone <database>=<timezone>Sets a database’s timezone, as an IANA name, such as DEMO_DB=America/Los_Angeles. Kater records it, but does not use it yet. You can give it more than one time.
--auth-method <method>Snowflake only. How the credential signs in: username_password or key_pair.
--account <account>Snowflake only. The account identifier, written as snowflake_account_id. The credential on Kater’s server must match it.
--warehouse <warehouse>Snowflake only. The warehouse that runs queries, such as COMPUTE_WH. The credential on Kater’s server must match it.
--role <role>Snowflake only. The role that queries run as, such as SYSADMIN. The credential on Kater’s server must match it.

It also takes the global options --json, --kater-root, --scope and --help.

When you change warehouse settings

Kater tests the connection with the new settings before it saves them. When the test fails, nothing changes. Run kater admin connection test after a change to the credential on Kater’s server.

What it changes

  • It rewrites only the lines that it changes, so the file keeps your comments.
  • To rename a database or a schema, or to give one a label or a description, edit the file.
  • It changes connection.yaml in your local copy. Commit the change and run kater git push to publish it.
  • You need edit access to the connection’s connection.yaml.

See also