安装和配置适用于 macOS 的 ODBC 驱动程序时出现问题

Dav*_*com 4 snowflake-cloud-data-platform

snowsql我可以通过和使用相同凭据的浏览器成功访问 Snowflake 。但是,这些凭据不适用于odbc-mac指南中所述的驱动程序。当我按照“步骤3:测试ODBC驱动程序”进行测试时,我得到以下经验:

$ "/Library/Application Support/iODBC/bin/iodbctest"

iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.1521.0607

Enter ODBC connect string (? shows list): dsn=SnowflakeDSII;pwd=[pwd]
OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)
OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)
OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)
OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)
OOB curl_easy_perform() failed: Problem with the SSL CA cert (path? access rights?)

1: SQLDriverConnect = [Snowflake][DSI] An error occurred while attempting to retrieve the error message for key 'SFRestRequestFailed' with message parameters ['[host]:443/session/v1/login-request?requestId=[id]&request_guid=[guid]&databaseName=[db_name]&warehouse=[wh]&roleName=[role]', 'CURLerror (curl_easy_perform() failed) - code=77 msg='Problem with the SSL CA cert (path? access rights?)' osCode=2 osMsg='No  (-1) SQLSTATE=HY000

1: ODBC_Connect = [Snowflake][DSI] An error occurred while attempting to retrieve the error message for key 'SFRestRequestFailed' with message parameters ['[host]:443/session/v1/login-request?requestId=[id]&request_guid=[guid]&databaseName=[db]&warehouse=[wh]&roleName=[role]', 'CURLerror (curl_easy_perform() failed) - code=77 msg='Problem with the SSL CA cert (path? access rights?)' osCode=2 osMsg='No  (-1) SQLSTATE=HY000
Run Code Online (Sandbox Code Playgroud)

我的odbc.ini文件是

[ODBC Data Sources]
SnowflakeDSII = Snowflake

[SnowflakeDSII]
Server = [host account].[aws region].snowflakecomputing.com
UID = [user]
Role        = [role]
Database    = [db]
Warehouse   = [warehouse]
Driver = /opt/snowflake/snowflakeodbc/lib/universal/libSnowflake.dylib
Run Code Online (Sandbox Code Playgroud)

还...

  • 我安装了驱动程序:snowflake_odbc_mac_arm64-2.25.0.dmg
  • 我必须手动mkdir universal手动cp lib/libSnowflake.dylib lib/universal/libSnowflake.dylib
  • (还有错误文件)

感谢您的时间!

更新

另请注意,系统找不到以下错误文件:

  "exceptionMessage": "CURLerror (curl_easy_perform() failed) - code=77 msg='Problem with the SSL CA cert (path? access rights?)' osCode=2 osMsg='No such file or directory'",
      "request":  "https://[host].us-east-1.snowflakecomputing.com:443/session/v1/login-request?requestId=b5ebf406-989e-4aab-a043-6b4b656961cd&request_guid=8b68691f-db12-44c3-9a91-1fc685cd87a5&databaseName=[db]&warehouse=[wh]&roleName=[role]",
      "sqlState": "HY000"
Run Code Online (Sandbox Code Playgroud)
  • “/opt/snowflake/snowflakeodbc/lib/universal/en-US/SFMessages.xml”
  • “/opt/snowflake/snowflakeodbc/lib/universal/SFMessages_en-US.xml”

所以我把touched它们填了,但后来错误说它们是“空的”

Dav*_*com 5

问题是系统需要的许多文件/lib/universal不存在。

解决方案是符号链接,或者将它们从/opt/snowflake/snowflakeodbc

例如:

# I found
/opt/snowflake/snowflakeodbc/lib/universal/en-US/SFMessages.xml
Run Code Online (Sandbox Code Playgroud)

/opt/snowflake/snowflakeodbc/ErrorMessages
Run Code Online (Sandbox Code Playgroud)

/opt/snowflake/snowflakeodbc/ErrorMessages
Run Code Online (Sandbox Code Playgroud)

谢谢@Sergiu 的日志记录指导!