<?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: Oracle JDBC Load Fails with Timestamp Partitioning (lowerBound/upperBound) in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/oracle-jdbc-load-fails-with-timestamp-partitioning-lowerbound/m-p/126750#M47762</link>
    <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/114440"&gt;@pavlosskev&lt;/a&gt;&amp;nbsp;Could you try adding the following option as well to your read?&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;.option("sessionInitStatement", "ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'")&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;df = (
    spark.read.format("jdbc")
    .option("url", jdbcUrl)
    .option("dbtable", query)
    .options(**connectionProperties)
    .option("sessionInitStatement", "ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'") 
    .option("partitionColumn", "TIJDSTEMPEL")
    .option("lowerBound", "2025-07-04 17:00:00")
    .option("upperBound", "2025-07-14 16:00:00")
    .option("numPartitions", 4)
    .load()
)
&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 28 Jul 2025 23:29:06 GMT</pubDate>
    <dc:creator>mani_22</dc:creator>
    <dc:date>2025-07-28T23:29:06Z</dc:date>
    <item>
      <title>Oracle JDBC Load Fails with Timestamp Partitioning (lowerBound/upperBound)</title>
      <link>https://community.databricks.com/t5/data-engineering/oracle-jdbc-load-fails-with-timestamp-partitioning-lowerbound/m-p/125432#M47445</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm trying to read data from an Oracle database into Databricks using JDBC with timestamp-based partitioning. However, it seems that the partitioning doesn't work as expected when I specify lowerBound and upperBound using timestamp strings (for Azure SQL this works fine).&lt;/P&gt;&lt;P&gt;Here's a simplified version of my code:&lt;/P&gt;&lt;PRE&gt;df = (
    spark.read.format("jdbc")
    .option("url", jdbcUrl)
    .option("dbtable", query)
    .options(**connectionProperties)
    .option("partitionColumn", "TIJDSTEMPEL")
    .option("lowerBound", "2025-07-04 17:00:00")
    .option("upperBound", "2025-07-14 16:00:00")
    .option("numPartitions", 4)
    .load()
)&lt;/PRE&gt;&lt;P&gt;The TIJDSTEMPEL column is a TIMESTAMP in Oracle. If I don't use partitioning, the query works fine. But as soon as I add the &lt;STRONG&gt;.option("partitionColumn", ...)&lt;/STRONG&gt; and&lt;STRONG&gt; bounds&lt;/STRONG&gt;, it returns the error:&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;ORA-01861: literal does not match format string&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Has anyone successfully loaded Oracle data using TIMESTAMP column for partitioning? Any advice or working examples would be appreciated!&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jul 2025 13:25:19 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/oracle-jdbc-load-fails-with-timestamp-partitioning-lowerbound/m-p/125432#M47445</guid>
      <dc:creator>pavlosskev</dc:creator>
      <dc:date>2025-07-16T13:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Oracle JDBC Load Fails with Timestamp Partitioning (lowerBound/upperBound)</title>
      <link>https://community.databricks.com/t5/data-engineering/oracle-jdbc-load-fails-with-timestamp-partitioning-lowerbound/m-p/126750#M47762</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/114440"&gt;@pavlosskev&lt;/a&gt;&amp;nbsp;Could you try adding the following option as well to your read?&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;.option("sessionInitStatement", "ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'")&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;df = (
    spark.read.format("jdbc")
    .option("url", jdbcUrl)
    .option("dbtable", query)
    .options(**connectionProperties)
    .option("sessionInitStatement", "ALTER SESSION SET NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS'") 
    .option("partitionColumn", "TIJDSTEMPEL")
    .option("lowerBound", "2025-07-04 17:00:00")
    .option("upperBound", "2025-07-14 16:00:00")
    .option("numPartitions", 4)
    .load()
)
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 28 Jul 2025 23:29:06 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/oracle-jdbc-load-fails-with-timestamp-partitioning-lowerbound/m-p/126750#M47762</guid>
      <dc:creator>mani_22</dc:creator>
      <dc:date>2025-07-28T23:29:06Z</dc:date>
    </item>
  </channel>
</rss>

