Support Questions
Find answers, ask questions, and share your expertise

adding multiple jars

Highlighted

adding multiple jars

Explorer

How can I add multiple jars to --driver-class-path. It works when I add 1 jar file, but does not work when I try to add multiple jars using a comma separated format.

Here is the shell command I am using. It does not pick up the second jar file.

pyspark2 --driver-class-path /home/jar/noarch-aster-jdbc-driver.jar,/home/jar/sqljdbc42.jar --jars /home/jar/noarch-aster-jdbc-driver.jar,/home/jar/sqljdbc42.jar

??

Thanks.

3 REPLIES 3
Highlighted

Re: adding multiple jars

@A C, separator for --driver-class-path will be ":" instead of ",". Do update the command and rerun the pyspark shell.

let know if this helps.

Re: adding multiple jars

Explorer

Have you tried with colons?

pyspark2 --driver-class-path /home/jar/noarch-aster-jdbc-driver.jar:/home/jar/sqljdbc42.jar --jars /home/jar/noarch-aster-jdbc-driver.jar,/home/jar/sqljdbc42.jar
Highlighted

Re: adding multiple jars

Explorer

I don't know if this has anything to do with different pyspark version. I have version 2.3.0. Finally, this format worked for me.

pyspark2 --driver-class-path "/home/jar/*" --jars /home/jar/noarch-aster-jdbc-driver.jar,/home/jar/sqljdbc42.jar

Don't have an account?