想要将redshift连接到R [英] Want to Connect redshift to R
问题描述
我尝试使用此代码链接,但出现错误
I tried to use the code from this link but I got an error
驱动程序<-JDBC("com.amazon.redshift.jdbc41.Driver","RedshiftJDBC41-1.1.9.1009.jar",identifier.quote =`") JavaVM:请求的Java版本((null))不可用.改为在"使用Java. Java虚拟机:无法加载JVM:/bundle/Libraries/libserver.dylib JavaVM FATAL:无法加载jvm库. .jinit(classPath)中的错误:JNI_GetCreatedJavaVM返回-1
driver <- JDBC("com.amazon.redshift.jdbc41.Driver", "RedshiftJDBC41-1.1.9.1009.jar", identifier.quote="`") JavaVM: requested Java version ((null)) not available. Using Java at "" instead. JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib JavaVM FATAL: Failed to load the jvm library. Error in .jinit(classPath) : JNI_GetCreatedJavaVMs returned -1
加载驱动程序并尝试连接后.我不知道如何将Redshift连接到R.
After loading the driver and trying to connect. I don't know how to connect Redshift to R.
推荐答案
这不能解决错误,但是如果您想从R连接到Redshift,可以使用 RPostgreSQL 库. 如另一个R-Redshift连接问题
This will not solve the error, but if you want to connect to Redshift from R, you can use RPostgreSQL library. as in the answer in another R-Redshift connection issue
library (RPostgreSQL)
drv <- dbDriver("PostgreSQL")
conn <- dbConnect(drv, host="your.host.us-east-1.redshift.amazonaws.com",
port="5439",
dbname="your_db_name",
user="user",
password="password")
您还需要确保您的IP是Redshift安全组白名单.
You also need to make sure that your IP is Redshift security group white list.
这篇关于想要将redshift连接到R的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!