Skip to main content
On this page

Kater CLI Set up init

kater init connection

Connects Kater to your Snowflake warehouse.

This is step 1 of kater init. It tests the sign-in, then stores the credential on Kater’s server. You type a password or a passphrase in a page in your browser, so it never goes into a command.

Examples

Terminal window
# Connect with a key pair. Kater reads the key from the file
kater init connection --name snowflake_prod_connection --account myorg-myaccount --warehouse COMPUTE_WH --role SYSADMIN --user kater_service --private-key-file ~/.ssh/kater_key.p8
# Connect with a key that has a passphrase. You type the passphrase in your browser
kater init connection --name snowflake_prod_connection --account myorg-myaccount --warehouse COMPUTE_WH --user kater_service --private-key-file ~/.ssh/kater_key.p8 --passphrase
# Connect with a password. You type the password in your browser
kater init connection --name snowflake_prod_connection --account myorg-myaccount --warehouse COMPUTE_WH --user kater_service --password

Options

OptionDescription
--name <name>Required. The connection’s name, in lower snake case, such as snowflake_prod_connection. It is also the name of the connection’s folder.
--account <account>Required. The Snowflake account identifier, such as myorg-myaccount.
--warehouse <warehouse>Required. The Snowflake warehouse that runs Kater’s queries, such as COMPUTE_WH.
--user <user>Required. The Snowflake user that Kater signs in as.
--role <role>The Snowflake role that Kater uses, such as SYSADMIN. Leave it out to use the user’s default role. Kater then saves the role that the test got.
--private-key-file <file>A PEM private key file, for key-pair sign-in. Kater reads the file and stores the key. Give this option or --password, not both.
--passphraseUse it when the key has a passphrase. The command opens a page in your browser, where you type the passphrase.
--passwordSigns in with a password instead of a key. The command opens a page in your browser, where you type the password.

It also takes --help.

How the test works

  • Kater checks the account, the sign-in, the warehouse and the role. When a check fails, error.stage names it, so you know which value to correct.
  • When the test passes, session gives the test session’s account, warehouse, role and Snowflake version.
  • The page for a password or a passphrase runs on this computer. The command waits 10 minutes at most for you to type it. Then it stops, and you run it again.
  • Run the step again to change the credential or the settings. The connection keeps its files and its schemas.

It needs the settings:manage permission.

See also