无法使用 Sqitch 连接到 Snowflake

Posted

技术标签:

【中文标题】无法使用 Sqitch 连接到 Snowflake【英文标题】:Unable to connect to Snowflake using Sqitch 【发布时间】:2019-10-04 19:37:07 【问题描述】:

我正在使用私钥身份验证连接到 Snowflake,但无法使用 Sqitch 进行连接。直接使用 snowsql 连接时,此功能成功。

我的连接字符串如下所示:

sqitch status -vvv db:snowflake://username@myaccount.snowflakecomputing.com/POC_DB?Driver=Snowflake;authenticator=SNOWFLAKE_JWT;priv_key_file=/Users/username/rsa_key.p8;priv_key_file_pwd=xxxxxx;warehouse=DEFAULT_WH;uid=username

在需要的地方屏蔽了真实值,但这些值与直接使用 snowsql 相同。

使用我看到的 -vvv 选项

[Snowflake][DSI] (20032) Required setting 'PWD' is not present in the connection settings. (SQL-28000)

trace: DBI::connect('DBI', 'dbi:ODBC:Server=myaccount.snowflakecomputing.com;Port=443;Database=POC_DB;Driver=Snowflake', 'username', undef, 'HASH(0x7fed7a719230)')

表示密码为“undef”。

~/.sqitch 中的 sqitch.conf 设置如下所示https://sqitch.org/docs/manual/sqitch-authentication/ 在不使用密码部分下。

我无法解决为什么在使用 snowsql 时它给了我丢失的 PWD 错误?

谢谢。

【问题讨论】:

【参考方案1】:

我确实找到了可能也实现连接的设置的参考:

https://medium.com/hashmapinc/ci-cd-on-snowflake-using-sqitch-and-jenkins-245c6dc4c205

使用 ODBC 和 sqitch https://sqitch.org/docs/manual/sqitchtutorial-snowflake/

看起来这个错误在这个 gitrepo 问题中得到了纠正:#439 https://github.com/sqitchers/sqitch/issues/439

【讨论】:

以上是关于无法使用 Sqitch 连接到 Snowflake的主要内容,如果未能解决你的问题,请参考以下文章

sqitch init snowflake 无法确定 Snowflake 账户名

无法使用Pyspark从EMR群集连接到Snowflake

使用 Snowflake 凭据连接到 SnowSQL 客户端

Sqitch 部署到雪花 DW 失败

无法使用 Pyspark 从 EMR 集群连接到雪花

使用 SSO 和基于浏览器的登录从 Python 连接到 Snowflake