Skip to main content

Connecting Vertica to R through JDBC

  • July 7, 2018
  • 5 replies
  • 18 views

shubhamb

Connecting Vertica to R through JDBC

I am trying to connect vertica database and access it with R.For this i came across ODBC and RJDBC. While moving forward with RJDBC , i installed all the client drivers and packages needed in R. The Vertica server has version 8.0.1 and client driver was 8.0.x for windows(I also tried in ubuntu with client drivers for the same) I also checked Java versions in both the platforms and it was 1.8.0_171. The error i am getting while making a connection with R is:

Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1], :
java.sql.SQLNonTransientConnectionException: [Vertica]VJDBC FATAL:
Unsupported frontend protocol 3.8: server supports 3.0 to 3.6

Also i tried with all the client driver versions available on myVertica.com
1)vertica-jdbc-9.1.0-0
2)vertica-jdbc-8.1.1-18
3)vertica-jdbc-8.0.1-6
4)vertica-jdbc-7.1.2-0
5)vertica-jdbc-7.2.3-0

My code in R is:
drv <- JDBC(driverClass="com.vertica.jdbc.Driver",
classPath="/Downloads/vertica-jdbc-8.0.1-6.jar")

conn <- dbConnect(drv, paste0("jdbc:vertica://",client.hostname,":5433/",client.dbname),user=client.username , password=client.password)

5 replies

SruthiA
Forum|alt.badge.img+1
  • Participating Frequently
  • July 8, 2018

What is your Java version? What is your vertica version including hotfix patch? What is version of your R environment?


shubhamb
  • Author
  • New Participant
  • July 8, 2018

Vertica version 8.0.1 , R version 3.4.1, and JRE version 1.8.0_171


SruthiA
Forum|alt.badge.img+1
  • Participating Frequently
  • July 8, 2018

We support R 3.0.0 on vertica 8.0.1. Can you use R 3.0.0 and try the connecting to Vertica using R?

https://my.vertica.com/docs/8.0.x/HTML/index.htm#Authoring/SupportedPlatforms/HPVerticaSDK.htm


shubhamb
  • Author
  • New Participant
  • July 8, 2018

Ok, will check .Also by giving administrative rights to my RStudio , it works fine,but its not a good solution.


shubhamb
  • Author
  • New Participant
  • July 8, 2018

.