Skip to content
Advertisement

is there a method to conect to postgresql (dbeaver ) from pyspark?

hello i installed pyspark now and i have a database postgres in local in DBeaver : how can i connect to postgres from pyspark please

i tried this

but i have an error

Advertisement

Answer

You need to add the jars you want to use when creating the sparkSession.

See this : https://spark.apache.org/docs/2.4.7/submitting-applications.html#advanced-dependency-management

Either when you start pyspark

or when you create your sparkSession objects

You need maven packages when you do not have the jar in local or your jars needs some dependencies.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement