I am trying to use Spark through Python to access (via JDBC) the PostGres database and the MSSQL database in the same session. In the spark-defaults.conf file, I can get one or the other to work, but not one or the other.
These two work independently:
spark.driver.extraClassPath /Users/myusername/spark-1.6.1-bin-hadoop2.4/lib/postgresql-9.4.1208.jre6.jar
spark.driver.extraClassPath /Users/myusername/spark-1.6.1-bin-hadoop2.4/lib/sqljdbc4.jar
I tried these three and none of them work (I get the error "there is no suitable driver"):
spark.driver.extraClassPath /Users/myusername/spark-1.6.1-bin-hadoop2.4/lib/
spark.driver.extraClassPath /Users/myusername/spark-1.6.1-bin-hadoop2.4/lib/postgresql-9.4.1208.jre6.jar sqljdbc4.jar
spark.driver.extraClassPath /Users/myusername/spark-1.6.1-bin-hadoop2.4/lib/postgresql-9.4.1208.jre6.jar /Users/myusername/spark-1.6.1-bin-hadoop2.4/lib/sqljdbc4.jar
Thanks in advance.
source
share