简体   繁体   English

通过 ODBC 将 R 连接到 Snowflake

[英]Connecting R to Snowflake through ODBC

I have been consistently receiving the same error while trying to create a connection between R and Snowflake using an ODBC driver.在尝试使用 ODBC 驱动程序在 R 和 Snowflake 之间创建连接时,我一直收到相同的错误。 The error that I'm receiving says:我收到的错误说:

'''Error during wrapup: nanodbc/nanodbc.cpp:1021: 00000: [unixODBC][Driver Manager]Can't open lib 'Snowflake': file not found Error: no more error handlers available (recursive errors?); '''总结期间出错:nanodbc/nanodbc.cpp:1021: 00000: [unixODBC][Driver Manager]无法打开 lib 'Snowflake':找不到文件错误:没有更多可用的错误处理程序(递归错误?); invoking 'abort' restart'''调用'中止'重启'''

The instructions given by Snowflake to connect a driver are rather cut and clear - but provides little insight on what to do with errors. Snowflake 给出的连接驱动程序的说明相当简洁明了 - 但对如何处理错误几乎没有提供任何见解。 Can anyone lead me as to where to go given this error?鉴于此错误,谁能引导我到 go 的位置?

This smells like a configuration issue.这闻起来像一个配置问题。 Your driver manager, unixODBC, isn't able to locate the Snowflake driver.您的驱动程序管理器 unixODBC 无法找到 Snowflake 驱动程序。 (The Snowflake documentation says on MacOS to use iODBC. Don't. It won't work with the odbc R package.) (Snowflake 文档在 MacOS 上说要使用 iODBC。不要。它不适用于 odbc R package。)

  1. Check that unixODBC is findable.检查是否可以找到 unixODBC。 Run odbcinst -j in a terminal.在终端中运行odbcinst -j If it works, you will know that you have unixODBC properly installed, and it will give you the paths to your various configuration files.如果它有效,您将知道您已经正确安装了 unixODBC,它会为您提供各种配置文件的路径。

  2. On to checking configuration.继续检查配置。 This is the documentation for configuring on Linux using unixODBC. 是使用 unixODBC 在 Linux 上进行配置的文档。 If you are using MacOS the same general instructions apply, but the file extensions will change from .so to .dylib .如果您使用的是 MacOS,则适用相同的一般说明,但文件扩展名将从.so更改为.dylib Since it's saying it can't find the file, I'm thinking that using full paths might resolve this for you.由于它说它找不到文件,我认为使用完整路径可能会为您解决这个问题。 It's also possible that there's some issue with how you are specifying the driver.您指定驱动程序的方式也可能存在一些问题。

Also, it looks like it's searching for a file named 'Snowflake'.此外,它看起来像是在搜索一个名为“Snowflake”的文件。 I'm thinking you've got Driver=Snowflake somewhere in one of your config files.我认为您的某个配置文件中有Driver=Snowflake Best change that to Driver=<path>/<to>/<driver>/libSnowflake.dylib (or .so if you're on Linux).最好将其更改为Driver=<path>/<to>/<driver>/libSnowflake.dylib (或者.so如果你在 Linux 上)。 Do this in all the places where you have Driver=Snowflake .在您拥有Driver=Snowflake的所有地方执行此操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM