Skip to content

Snowflake 凭据(Snowflake credentials)#

你可以使用以下凭据验证以下节点:

🌐 You can use these credentials to authenticate the following nodes:

先决条件(Prerequisites)#

创建一个 Snowflake 账户。

🌐 Create a Snowflake account.

支持的身份验证方法(Supported authentication methods)#

有关该服务的更多信息,请参阅 Snowflake 的 API 文档SQL 命令参考

🌐 Refer to Snowflake's API documentation and SQL Command Reference for more information about the service.

常用配置字段(Common configuration fields)#

两种身份验证方法都需要以下字段:

🌐 Both authentication methods require the following fields:

  • 账户 名称:你的账户名称是位于 Snowflake URL 中 https://snowflakecomputing.com 之间的字符字符串。例如,如果你的 Snowflake 账户 URL 是 https://abc.eu-central-1.snowflakecomputing.com,那么你的账户名称是 abc.eu-central-1
  • 一个 数据库:输入凭证应该连接的 数据库 名称。
  • 仓库:输入连接后会话要使用的默认虚拟仓库的名称。n8n 会使用此仓库执行查询、加载数据等操作。
  • A 模式:连接后输入你想使用的模式
  • A 角色:在连接后输入你想使用的安全角色
  • 客户端会话保持活跃:默认情况下,客户端连接通常会在最近一次查询执行后三到四小时过期。启用此设置会将 clientSessionKeepAlive 参数设置为 true:即使连接没有执行任何查询,服务器也会无限期保持客户端连接活跃。

有关这些设置的更多信息,请参阅会话命令

🌐 Refer to Session Commands for more information on these settings.

使用密码认证(Using password authentication)#

除了常见配置字段之外,密码认证还需要:

🌐 In addition to the common configuration fields, password authentication requires:

  • 用户名
  • 密码

使用密钥对认证(Using key-pair authentication)#

密钥对认证提供了比基于密码的认证更高的安全性。这种方法使用公钥-私钥对进行认证。

🌐 Key-pair authentication provides enhanced security as an alternative to password-based authentication. This method uses a public-private key pair for authentication.

除了常见配置字段之外,密钥对认证还需要:

🌐 In addition to the common configuration fields, key-pair authentication requires:

  • 用户名:已分配公钥的 Snowflake 用户。
  • 私钥:以 PEM 格式(PKCS#8)的私钥。应包含私钥文件的完整内容,包括 -----BEGIN ENCRYPTED PRIVATE KEY----------END ENCRYPTED PRIVATE KEY----- 分隔符(未加密的密钥则为 -----BEGIN PRIVATE KEY----------END PRIVATE KEY-----)。
  • 密码短语(可选):如果你的私钥已加密,请输入用于加密的密码短语。如果你使用的是未加密的私钥,请将此字段留空。

有关生成和配置密钥对的更多信息,请参阅 Snowflake 的密钥对认证文档

🌐 Refer to Snowflake's key-pair authentication documentation for more information about generating and configuring key pairs.