snow connection add¶
添加与配置文件的连接。
语法
实参
无
选项
--connection-name, -n TEXT新连接的名称。
-a, --account, --accountname TEXT使用 Snowflake 进行身份验证时使用的账户名。
-u, --user, --username TEXT连接到 Snowflake 的用户名。
-p, --password TEXTSnowflake 密码。
-r, --role, --rolename TEXT在 Snowflake 上使用的角色。
-w, --warehouse TEXT在 Snowflake 上使用的仓库。
-d, --database, --dbname TEXT在 Snowflake 上使用的数据库。
-s, --schema, --schemaname TEXT在 Snowflake 上使用的架构。
-h, --host TEXT连接尝试连接到 Snowflake 的主机名。
-P, --port INTEGER主机上要与之通信的端口。
--region, -R TEXT如果不是默认 Snowflake 部署,则使用区域名称。
-A, --authenticator TEXT如果不是基于密码,则选择身份验证器。
-W, --workload-identity-provider TEXTWorkload identity provider type.
--private-key, -k, --private-key-file, --private-key-path TEXT包含私钥的文件路径。
-t, --token-file-path TEXT连接到 Snowflake 时应使用的带有 OAuth 令牌的文件路径。
--default如果提供,连接将配置为默认连接。默认值:False。
--no-interactive禁用提示。默认值: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]指定输出格式。默认: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.
--silent关闭到控制台的中间输出。默认值:False。
--enhanced-exit-codes根据错误类型区分退出错误代码。默认值: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.
使用说明
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.
示例
要添加连接,请运行以下命令: