cannot connect
#2961
-
i am trying insert a new table to PG data base and still getting " No suitable driver "
|
Beta Was this translation helpful? Give feedback.
Answered by
sehrope
Oct 5, 2023
Replies: 1 comment 7 replies
-
You can try calling class.forName("org.postgresql.Driver") spark may not automatically load it |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you have a missing "s" in "postgre__S__ql" in:
"/Users/ronorgad/Desktop/testing_pyspark/postgreql-42.6.0.jar"
Whatever path you have there, copy it from your code and make sure you can run from a terminal:
ls -l "/Users/ronorgad/Desktop/testing_pyspark/postgreql-42.6.0.jar"
If that does not work, a spark related forum would be more appropriate for this type of question as it's not an issue with the driver. This is a spark configuration issue.