<?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>question Oracle Update statement from Spark in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Oracle-Update-statement-from-Spark/m-p/193638#M155698</link>
    <description>&lt;P&gt;can I execute update statement using &lt;/P&gt;&lt;P&gt;spark.read.format("jdbc").options(&lt;/P&gt;&lt;PRE&gt;   Map("driver" -&amp;gt; "oracle.jdbc.driver.OracleDriver",&amp;lt;br&amp;gt;     "url" -&amp;gt; url,&amp;lt;br&amp;gt;     "dbtable" -&amp;gt; sqlUpdate,&amp;lt;br&amp;gt;     "user" -&amp;gt; username,&amp;lt;br&amp;gt;     "password" -&amp;gt; password)).load()
?&lt;/PRE&gt;</description>
    <pubDate>Fri, 18 May 2018 05:35:55 GMT</pubDate>
    <dc:creator>anujtanwar12</dc:creator>
    <dc:date>2018-05-18T05:35:55Z</dc:date>
    <item>
      <title>Oracle Update statement from Spark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oracle-Update-statement-from-Spark/m-p/193638#M155698</link>
      <description>&lt;P&gt;can I execute update statement using &lt;/P&gt;&lt;P&gt;spark.read.format("jdbc").options(&lt;/P&gt;&lt;PRE&gt;   Map("driver" -&amp;gt; "oracle.jdbc.driver.OracleDriver",&amp;lt;br&amp;gt;     "url" -&amp;gt; url,&amp;lt;br&amp;gt;     "dbtable" -&amp;gt; sqlUpdate,&amp;lt;br&amp;gt;     "user" -&amp;gt; username,&amp;lt;br&amp;gt;     "password" -&amp;gt; password)).load()
?&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 May 2018 05:35:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oracle-Update-statement-from-Spark/m-p/193638#M155698</guid>
      <dc:creator>anujtanwar12</dc:creator>
      <dc:date>2018-05-18T05:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle Update statement from Spark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oracle-Update-statement-from-Spark/m-p/193639#M155699</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/78455/anujtanwar12.html" nodeid="78455"&gt;@Anuj Tanwar&lt;/A&gt; AFAIK updates are supported with spark jdbc. Alternative is to use standard jdbc  - You can read more here &lt;A href="https://stackoverflow.com/questions/34643200/spark-dataframes-upsert-to-postgres-table" target="_blank"&gt;https://stackoverflow.com/questions/34643200/spark-dataframes-upsert-to-postgres-table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.&lt;/P&gt;</description>
      <pubDate>Fri, 18 May 2018 23:33:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oracle-Update-statement-from-Spark/m-p/193639#M155699</guid>
      <dc:creator>falbani</dc:creator>
      <dc:date>2018-05-18T23:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle Update statement from Spark</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Oracle-Update-statement-from-Spark/m-p/193640#M155700</link>
      <description>&lt;P&gt;I used OracleDataSource() to make connection and it worked.&lt;/P&gt;&lt;PRE&gt;val ods = new OracleDataSource()&lt;BR /&gt;&lt;BR /&gt;ods.setUser(username)&lt;BR /&gt;ods.setPassword(password)&lt;BR /&gt;ods.setURL(url)&lt;BR /&gt;&lt;BR /&gt;val connection = ods.getConnection()&lt;BR /&gt;connection.setAutoCommit(false)&lt;BR /&gt;&lt;BR /&gt;val prepUpdateStat = connection.prepareStatement(sqlUpdate)&lt;BR /&gt;prepUpdateStat.execute()&lt;BR /&gt;connection.commit()&lt;BR /&gt;prepUpdateStat.close()&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 May 2018 23:34:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Oracle-Update-statement-from-Spark/m-p/193640#M155700</guid>
      <dc:creator>anujtanwar12</dc:creator>
      <dc:date>2018-05-18T23:34:02Z</dc:date>
    </item>
  </channel>
</rss>

