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>
--workload-identity-provider <workload_identity_provider>
--private-key <private_key_file>
--token-file-path <token_file_path>
--default
--no-interactive
--format <format>
--verbose
--debug
--silent
--enhanced-exit-codes
Arguments¶
None
Options¶
--connection-name, -n TEXTName of the new connection.
-a, --account, --accountname TEXTAccount name to use when authenticating with Snowflake.
-u, --user, --username TEXTUsername to connect to Snowflake.
-p, --password TEXTSnowflake password.
-r, --role, --rolename TEXTRole to use on Snowflake.
-w, --warehouse TEXTWarehouse to use on Snowflake.
-d, --database, --dbname TEXTDatabase to use on Snowflake.
-s, --schema, --schemaname TEXTSchema to use on Snowflake.
-h, --host TEXTHost name the connection attempts to connect to Snowflake.
-P, --port INTEGERPort to communicate with on the host.
--region, -R TEXTRegion name if not the default Snowflake deployment.
-A, --authenticator TEXTChosen authenticator, if other than password-based.
-W, --workload-identity-provider TEXTWorkload identity provider type.
--private-key, -k, --private-key-file, --private-key-path TEXTPath to file containing private key.
-t, --token-file-path TEXTPath to file with an OAuth token that should be used when connecting to Snowflake.
--defaultIf provided the connection will be configured as default connection. Default: False.
--no-interactiveDisable prompting. Default: False.
--format [TABLE|JSON|JSON_EXT|CSV]Specifies the output format. Default: TABLE.
--verbose, -vDisplays log entries for log levels
infoand higher. Default: False.--debugDisplays log entries for log levels
debugand higher; debug logs contain additional information. Default: False.--silentTurns off intermediate output to console. Default: False.
--enhanced-exit-codesDifferentiate exit error codes based on failure type. Default: False.
--helpDisplays 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
Enter connection name: <connection_name>
Enter account: <account>
Enter user: <user-name>
Enter password: <password>
Enter role: <role-name>
Enter warehouse: <warehouse-name>
Enter database: <database-name>
Enter schema: <schema-name>
Enter host: <host-name>
Enter port: <port-number>
Enter region: <region-name>
Enter authenticator: <authentication-method>
Enter private key file: <path-to-private-key-file>
Enter token file path: <path-to-mfa-token>
Do you want to configure key pair authentication? [y/N]: y
Key length [2048]: <key-length>
Output path [~/.ssh]: <path-to-output-file>
Private key passphrase: <key-description>
Wrote new connection <connection-name> to config.toml
Wrote new connection my_conn to <user-home>/.snowflake/config.toml