Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-28-2020 01:56 AM
Hi,
I am trying the same. What I am stuck is figuring out how to upload the Key and Certificate files for the JDBC driver to use when using SSL. The connection should look like:
remote_table = spark.read.format("jdbc")\
.option("driver", driver)\
.option("url", url)\
.option("dbtable", table)\
.option("user", user)\
.option("password", password)\
.option("ssl", True) \
.options("sslmode", "verify-full" ) \
.options("sslcert", "path_to_cert" ) \
.options("sslkey", "path_to_key" ) \
.load()
But I dont know how or where to upload the certificate and and key, so when I ran it I get the following error:
org.postgresql.util.PSQLException: SSL error: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Any idea how to upload the cert and key to the cluster so that JDBC can find it?