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_file>
  --token-file-path <token_file_path>
  --default
  --no-interactive
  --format <format>
  --verbose
  --debug
  --silent
Copy

Arguments¶

None

Options¶

--connection-name, -n TEXT

Name of the new connection.

-a, --account, --accountname TEXT

Account name to use when authenticating with Snowflake.

-u, --user, --username TEXT

Username to connect to Snowflake.

-p, --password TEXT

Snowflake password.

-r, --role, --rolename TEXT

Role to use on Snowflake.

-w, --warehouse TEXT

Warehouse to use on Snowflake.

-d, --database, --dbname TEXT

Database to use on Snowflake.

-s, --schema, --schemaname TEXT

Schema to use on Snowflake.

-h, --host TEXT

Host name the connection attempts to connect to Snowflake.

-P, --port INTEGER

Port to communicate with on the host.

--region, -R TEXT

Region name if not the default Snowflake deployment.

-A, --authenticator TEXT

Chosen authenticator, if other than password-based.

--private-key, -k, --private-key-file, --private-key-path TEXT

Path to file containing private key.

-t, --token-file-path TEXT

Path to file with an OAuth token that should be used when connecting to Snowflake.

--default

If provided the connection will be configured as default connection. Default: False.

--no-interactive

Disable prompting. Default: False.

--format [TABLE|JSON]

Specifies the output format. Default: TABLE.

--verbose, -v

Displays log entries for log levels info and higher. Default: False.

--debug

Displays log entries for log levels debug and higher; debug logs contain additional information. Default: False.

--silent

Turns off intermediate output to console. Default: False.

--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 Configuring Snowflake CLI and connecting to Snowflake.

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