<?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 Re: How to write Spark dataframe to Oracle database from databricks environment ? in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/how-to-write-spark-dataframe-to-oracle-database-from-databricks/m-p/15183#M9540</link>
    <description>&lt;P&gt;we can use JDBC driver to write dataframe to Oracle tables.&lt;/P&gt;&lt;P&gt;&lt;B&gt;Download Oracle ojdbc6.jar JDBC Driver&lt;/B&gt;&lt;/P&gt;&lt;P&gt;You need an Oracle jdbc driver to connect to the Oracle server. The latest version of the Oracle jdbc driver is ojdbc6.jar file. You can download the driver version as per your JDK version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can download this driver from official&amp;nbsp;&lt;A href="https://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html%EF%BB%BF" alt="https://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html%EF%BB%BF" target="_blank"&gt;website&lt;/A&gt;. Go ahead and create Oracle account to download if you do not have. Or can download from maven as dependent library in cluster or job directly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Databricks Clusters UI, install your third-party library .jar or Maven artifact with&amp;nbsp;&lt;B&gt;Library Source&lt;/B&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Upload DBFS, DBFS/S3  or&amp;nbsp;Maven. Alternatively, use the Databricks libraries API.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="install-library"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/960i3DEC8649B42A602D/image-size/large?v=v2&amp;amp;px=999" role="button" title="install-library" alt="install-library" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Load Spark DataFrame to Oracle Table Example&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Now the environment is se. we can use dataframe.write method to load dataframe into Oracle tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the following piece of code will establish JDBC connection with the Oracle database and copy dataframe content into mentioned table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Df.write.format('jdbc').options(
&amp;nbsp;
      url='jdbc:oracle:thin:@192.168.11.100:1521:ORCL',
&amp;nbsp;
      driver='oracle.jdbc.driver.OracleDriver',
&amp;nbsp;
      dbtable='testschema.test',
&amp;nbsp;
      user='testschema',
&amp;nbsp;
      password='password').mode('append').save()
&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Dec 2022 06:18:08 GMT</pubDate>
    <dc:creator>ramravi</dc:creator>
    <dc:date>2022-12-22T06:18:08Z</dc:date>
    <item>
      <title>How to write Spark dataframe to Oracle database from databricks environment ?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-write-spark-dataframe-to-oracle-database-from-databricks/m-p/15182#M9539</link>
      <description />
      <pubDate>Thu, 22 Dec 2022 06:10:20 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-write-spark-dataframe-to-oracle-database-from-databricks/m-p/15182#M9539</guid>
      <dc:creator>prasannar</dc:creator>
      <dc:date>2022-12-22T06:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Spark dataframe to Oracle database from databricks environment ?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-write-spark-dataframe-to-oracle-database-from-databricks/m-p/15183#M9540</link>
      <description>&lt;P&gt;we can use JDBC driver to write dataframe to Oracle tables.&lt;/P&gt;&lt;P&gt;&lt;B&gt;Download Oracle ojdbc6.jar JDBC Driver&lt;/B&gt;&lt;/P&gt;&lt;P&gt;You need an Oracle jdbc driver to connect to the Oracle server. The latest version of the Oracle jdbc driver is ojdbc6.jar file. You can download the driver version as per your JDK version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can download this driver from official&amp;nbsp;&lt;A href="https://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html%EF%BB%BF" alt="https://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html%EF%BB%BF" target="_blank"&gt;website&lt;/A&gt;. Go ahead and create Oracle account to download if you do not have. Or can download from maven as dependent library in cluster or job directly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Databricks Clusters UI, install your third-party library .jar or Maven artifact with&amp;nbsp;&lt;B&gt;Library Source&lt;/B&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Upload DBFS, DBFS/S3  or&amp;nbsp;Maven. Alternatively, use the Databricks libraries API.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="install-library"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/960i3DEC8649B42A602D/image-size/large?v=v2&amp;amp;px=999" role="button" title="install-library" alt="install-library" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Load Spark DataFrame to Oracle Table Example&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Now the environment is se. we can use dataframe.write method to load dataframe into Oracle tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the following piece of code will establish JDBC connection with the Oracle database and copy dataframe content into mentioned table.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Df.write.format('jdbc').options(
&amp;nbsp;
      url='jdbc:oracle:thin:@192.168.11.100:1521:ORCL',
&amp;nbsp;
      driver='oracle.jdbc.driver.OracleDriver',
&amp;nbsp;
      dbtable='testschema.test',
&amp;nbsp;
      user='testschema',
&amp;nbsp;
      password='password').mode('append').save()
&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 06:18:08 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-write-spark-dataframe-to-oracle-database-from-databricks/m-p/15183#M9540</guid>
      <dc:creator>ramravi</dc:creator>
      <dc:date>2022-12-22T06:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Spark dataframe to Oracle database from databricks environment ?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-write-spark-dataframe-to-oracle-database-from-databricks/m-p/15184#M9541</link>
      <description>&lt;P&gt;Thanks for detailed explanation and example.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 06:19:50 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-write-spark-dataframe-to-oracle-database-from-databricks/m-p/15184#M9541</guid>
      <dc:creator>prasannar</dc:creator>
      <dc:date>2022-12-22T06:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to write Spark dataframe to Oracle database from databricks environment ?</title>
      <link>https://community.databricks.com/t5/data-engineering/how-to-write-spark-dataframe-to-oracle-database-from-databricks/m-p/15185#M9542</link>
      <description>&lt;P&gt;Hi @Prasanna Lakshmi​&amp;nbsp;you can use JDBC API to read and write the data from databricks.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 07:10:35 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/how-to-write-spark-dataframe-to-oracle-database-from-databricks/m-p/15185#M9542</guid>
      <dc:creator>Ajay-Pandey</dc:creator>
      <dc:date>2022-12-22T07:10:35Z</dc:date>
    </item>
  </channel>
</rss>

