Pyspark36830;- 25509;- Postgresql38169; java.lang.ClassNotFoundException: org.postgresql.Driver

How to connect pyspark with PostgreSQL

Method 1: the PostgreSQL jar package placed in the spark2/jars path does not work. (error)

Method 2: setting spark. Conf. set in spark. Conf. set (‘spark. Jars’, ‘/ usr/HDP/ Jar’) does not work. (error)


When starting pyspark, add parameters after it

pyspark –jars  / usr/hdp/

That’s fine

Read More: