I’m trying to read data from JDBC in Spark Scala. Below is the code written in Databricks.
val df = spark
.read
.format("jdbc")
.option("url", <connection-string>)
.option("dbtable", <table-name>)
.option("user", <username>)
.option("password", <password>)
.option("ssl", True)
.option("sslmode", "require")
.load()
I’m getting the following error message:
java.sql.SQLNonTransientConnectionException: Could not connect to 10.6.8.86:3306 : PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Could someone please let me know how to resolve this issue.