I am trying to connect from Spark v2.3.1 with Scala 2.11.8 to Vertica DB with the jdbc.
On your webpage: https://www.vertica.com/blog/whats-new-vertica-8-1-connector-apache-spark/
It says that I can download the Spark Connector at the following location: https://my.vertica.com/download/vertica/8-1-x/
It takes me to a login page, after log-in, there is a message on an yellow box that says that I do not have permission to view that download.
I tried to download from your drivers page, under the Linux package there are 3 jar files in there (vertica-javadoc, vertica-jdbc, vertica-jdbc-8.0.1-0), but I cannot find the Vertica-Spark Connector (i.e.: vertica-8.1.0_spark2.0_scala2.11.jar)
Here is my Spark/Scala jdbc script:
val url = "jdbc:vertica//hostname/DBName?username=username&password=pw"
val query = "SELECT * FROM TABLE;"
val df = spark.read.format("jdbc")
.option("driver", "com.vertica.jdbc.Driver")
.option("url", url)
.option("dbtable", query)
.load()
I am using Scala Eclipse IDE, and loaded the 3jar files that come under the Linux download drivers (vertica-javadoc, vertica-jdbc, vertica-jdbc-8.0.1-0)
and I get the error:
Exception in thread "main" java.lang.NullPointerException
at org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$.resolveTable(JDBCRDD.scala:70)
at org.apache.spark.sql.execution.datasources.jdbc.JDBCRelation.(JDBCRelation.scala:115)
at org.apache.spark.sql.execution.datasources.jdbc.JdbcRelationProvider.createRelation(JdbcRelationProvider.scala:52)
at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:340)
at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:239)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:227)
at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:164)
at att.com.vert2$.main(vert2.scala:37)
at att.com.vert2.main(vert2.scala)
What am I doing wrong? Am I missing the Vertica-Spark Connector?
thank you! Markus.