snow connection add¶

Adds a connection to configuration file.

Syntax¶

snow connection add
  --connection-name <connection_name>
  --account <account>
  --user <user>
  --password <password>
  --role <role>
  --warehouse <warehouse>
  --database <database>
  --schema <schema>
  --host <host>
  --port <port>
  --region <region>
  --authenticator <authenticator>
  --private-key <private_key_path>
  --default
  --format <format>
  --verbose
  --debug
  --silent
Copy

Arguments¶

None

Options¶

--connection-name, -n TEXT

Name of the new connection.

--account, -a, --accountname TEXT

Account name to use when authenticating with Snowflake.

--user, -u, --username TEXT

Username to connect to Snowflake.

--password, -p TEXT

Snowflake password.

--role, -r TEXT

Role to use on Snowflake.

--warehouse, -w TEXT

Warehouse to use on Snowflake.

--database, -d TEXT

Database to use on Snowflake.

--schema, -s TEXT

Schema to use on Snowflake.

--host, -h TEXT

Host name the connection attempts to connect to Snowflake.

--port, -P TEXT

Port to communicate with on the host.

--region, -R TEXT

Region name if not the default Snowflake deployment.

--authenticator, -A TEXT

Chosen authenticator, if other than password-based.

--private-key, -k TEXT

Path to file containing private key.

--default

If provided the connection will be configured as default connection.

--format [TABLE|JSON]

Specifies the output format.

--verbose, -v

Displays log entries for log levels info and higher.

--debug

Displays log entries for log levels debug and higher; debug logs contains additional information.

--silent

Turns off intermediate output to console.

--help

Displays the help text for this command.

Usage notes¶

The snow connection add command adds the connection to your default config.toml file. For more information, see Connecting to Snowflake and configuring Snowflake CLI.

Examples¶

To add a connection, run the following:

$ snow connection add
Name for this connection: my_conn
Snowflake account name: my_sf_account
Snowflake username: jdoe
Snowflake password [optional]:
Role for the connection [optional]: accountadmin
Warehouse for the connection [optional]: my_wh
Database for the connection [optional]:
Schema for the connection [optional]:
Connection host [optional]:
Connection port [optional]:
Snowflake region [optional]:
Authentication method [optional]:
Path to private key file [optional]:
Copy
Wrote new connection my_conn to <user-home>/.snowflake/config.toml