Hi there,
i am trying to set yp the connection to a PlanetScale MySQL database. I have followed all of the configuration steps but receive the following:
remote_table = (spark.read
.format("jdbc")\
.option("driver", driver)\
.option("url", url)\
.option("dbtable", table)\
.option("user", username)\
.option("password", passwd)\
.option("ssl", True) \
.options("sslmode", "require" ) \
.options("sslcert", "dbfs:/mnt/*****-data-landing/admin/my_cert.pem") \
.load()
)
error message:
TypeError: options() takes 1 positional argument but 3 were given
--------------------------------------------------------------------------- TypeError Traceback (most recent call last)
<command-3539186329914624> in <module>
12 url = "<url_path>"
13 --->
14 remote_table = (spark.read
15 .format("jdbc")\
16 .option("driver", driver)\
TypeError: options() takes 1 positional argument but 3 were given
I am aware this Type error is a bit of a needle in a haystack kind of situation but if anyone has come across this before or can see anything obvious in my setup. First time connecting to MySQL in Datarbicks. Thanks