snow connection add¶
Adds a connection to configuration file.
Syntax¶
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.
--secondary-roles TEXTSecondary roles mode applied when the session starts. Supported values are
ALLandNONE; passNONEto run the session only with the primary role.--format [TABLE%JSON%JSON_EXT|CSV]Specifies the output format. Default: TABLE.
--verbose, -vDisplays log entries for log levels info and higher. Default: False.
--debugDisplays log entries for log levels debug and 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.
--decimal-precision INTEGERNumber of decimal places to display for decimal values. Uses Python’s default precision if not specified. [env var: SNOWFLAKE_DECIMAL_PRECISION].
--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: