<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic MySQL Connection: too many positional arguments in '.options()' in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/mysql-connection-too-many-positional-arguments-in-options/m-p/21945#M526</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;remote_table = (spark.read&lt;/P&gt;&lt;P&gt; .format("jdbc")\&lt;/P&gt;&lt;P&gt; .option("driver", driver)\&lt;/P&gt;&lt;P&gt; .option("url", url)\&lt;/P&gt;&lt;P&gt; .option("dbtable", table)\&lt;/P&gt;&lt;P&gt; .option("user", username)\&lt;/P&gt;&lt;P&gt; .option("password", passwd)\&lt;/P&gt;&lt;P&gt; .option("ssl", True) \&lt;/P&gt;&lt;P&gt; .options("sslmode", "require" ) \&lt;/P&gt;&lt;P&gt; .options("sslcert", "dbfs:/mnt/*****-data-landing/admin/my_cert.pem") \&lt;/P&gt;&lt;P&gt; .load()&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TypeError: options() takes 1 positional argument but 3 were given&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------- TypeError Traceback (most recent call last) &lt;/P&gt;&lt;P&gt;&amp;lt;command-3539186329914624&amp;gt; in &amp;lt;module&amp;gt; &lt;/P&gt;&lt;P&gt;12 url = "&amp;lt;url_path&amp;gt;" &lt;/P&gt;&lt;P&gt;13 ---&amp;gt; &lt;/P&gt;&lt;P&gt;14 remote_table = (spark.read &lt;/P&gt;&lt;P&gt;15 .format("jdbc")\ &lt;/P&gt;&lt;P&gt;16 .option("driver", driver)\ &lt;/P&gt;&lt;P&gt;TypeError: options() takes 1 positional argument but 3 were given&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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&lt;/P&gt;</description>
    <pubDate>Thu, 17 Nov 2022 11:15:56 GMT</pubDate>
    <dc:creator>190809</dc:creator>
    <dc:date>2022-11-17T11:15:56Z</dc:date>
    <item>
      <title>MySQL Connection: too many positional arguments in '.options()'</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/mysql-connection-too-many-positional-arguments-in-options/m-p/21945#M526</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;remote_table = (spark.read&lt;/P&gt;&lt;P&gt; .format("jdbc")\&lt;/P&gt;&lt;P&gt; .option("driver", driver)\&lt;/P&gt;&lt;P&gt; .option("url", url)\&lt;/P&gt;&lt;P&gt; .option("dbtable", table)\&lt;/P&gt;&lt;P&gt; .option("user", username)\&lt;/P&gt;&lt;P&gt; .option("password", passwd)\&lt;/P&gt;&lt;P&gt; .option("ssl", True) \&lt;/P&gt;&lt;P&gt; .options("sslmode", "require" ) \&lt;/P&gt;&lt;P&gt; .options("sslcert", "dbfs:/mnt/*****-data-landing/admin/my_cert.pem") \&lt;/P&gt;&lt;P&gt; .load()&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TypeError: options() takes 1 positional argument but 3 were given&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------- TypeError Traceback (most recent call last) &lt;/P&gt;&lt;P&gt;&amp;lt;command-3539186329914624&amp;gt; in &amp;lt;module&amp;gt; &lt;/P&gt;&lt;P&gt;12 url = "&amp;lt;url_path&amp;gt;" &lt;/P&gt;&lt;P&gt;13 ---&amp;gt; &lt;/P&gt;&lt;P&gt;14 remote_table = (spark.read &lt;/P&gt;&lt;P&gt;15 .format("jdbc")\ &lt;/P&gt;&lt;P&gt;16 .option("driver", driver)\ &lt;/P&gt;&lt;P&gt;TypeError: options() takes 1 positional argument but 3 were given&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 11:15:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/mysql-connection-too-many-positional-arguments-in-options/m-p/21945#M526</guid>
      <dc:creator>190809</dc:creator>
      <dc:date>2022-11-17T11:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: MySQL Connection: too many positional arguments in '.options()'</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/mysql-connection-too-many-positional-arguments-in-options/m-p/21948#M529</link>
      <description>&lt;P&gt;Hi thanks, no this was not the solution but i fixed it.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 07:30:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/mysql-connection-too-many-positional-arguments-in-options/m-p/21948#M529</guid>
      <dc:creator>190809</dc:creator>
      <dc:date>2022-11-21T07:30:29Z</dc:date>
    </item>
  </channel>
</rss>

