<?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 load Date columns with nanoseconds in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-Date-columns-with-nanoseconds/m-p/2352493#M118878</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;java.sql.Timestamp supports nanosecond for DB, that is a SUN workaround for JDBC, and the date format have to be "yyyy-mm-dd hh:mm:ss.[fff...]"&lt;/P&gt;&lt;P&gt;Since java.util.Date is used in Talend, the micros / nanosecond precision is not available. However some components might check if the incoming Object type is&amp;nbsp;java.sql.Timestamp in which case the nanoseconds are available as well. For this to be leveraged the Object type should be selected in the schema definition, and the source / target components needs to support it.Experiments worth execution&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Using a tFileOutput components dump / read these values. This way the Timezone could be controlled better.&lt;/LI&gt;&lt;LI&gt;Use the -Duser.timezone parameter to see if this changes the behavior.&amp;nbsp;More on this: &lt;A href="https://docs.oracle.com/javase/9/troubleshoot/time-zone-settings-jre.htm#JSTGD359" alt="https://docs.oracle.com/javase/9/troubleshoot/time-zone-settings-jre.htm#JSTGD359" target="_blank"&gt;https://docs.oracle.com/javase/9/troubleshoot/time-zone-settings-jre.htm#JSTGD359&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Consult the JDBC drivers documentation how these timezones are handled.&lt;/LI&gt;&lt;LI&gt;use tLogRow with the following pattern / result:&amp;nbsp;"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"&lt;/LI&gt;&lt;LI&gt;2001-07-04T12:08:56.235-07:00&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Then the target database may or may not able to store the Timestamp part of the above examples, which combined with the timezone could lead to days shifting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Possible Workarounds&lt;/P&gt;&lt;P&gt;Use&amp;nbsp;Strings and see if the database or their driver&amp;nbsp;can handle the transformation. With String what you see is what you have, no extra hidden information.&lt;/P&gt;&lt;P&gt;Convert between timezones using Java code in a tJavaRow&lt;/P&gt;&lt;P&gt;String pattern = "yyyy-MM-dd";&lt;/P&gt;&lt;P&gt;&lt;A href="http://log.info" alt="http://log.info" target="_blank"&gt;log.info&lt;/A&gt;(TalendDate.formatDate(pattern, input_row.startDate));&lt;/P&gt;&lt;P&gt;output_row.startDateUTC =&amp;nbsp;TalendDate.parseDateInUTC("yyyy-MM-dd &lt;B&gt;zzz&lt;/B&gt;", TalendDate.formatDate("yyyy-MM-dd", input_row.startDate)+" &lt;B&gt;UTC&lt;/B&gt;");&lt;/P&gt;&lt;P&gt; Let us know if it helps.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jul 2021 03:54:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-07-06T03:54:14Z</dc:date>
    <item>
      <title>How to load Date columns with nanoseconds</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-Date-columns-with-nanoseconds/m-p/2352490#M118875</link>
      <description>&lt;P&gt;Hello.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to get some fields from an Oracle DB which have type TIMESTAMP(6) and then load them into another database and table with nanosecons acuracy. Is theare any way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some thoughts about it. Patch tOracleInput and tOracleOutput components to make them using java.sql.Timestamp type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to do that by other means?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:58:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-Date-columns-with-nanoseconds/m-p/2352490#M118875</guid>
      <dc:creator>alex_cr</dc:creator>
      <dc:date>2024-11-15T23:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to load Date columns with nanoseconds</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-Date-columns-with-nanoseconds/m-p/2352491#M118876</link>
      <description>&lt;P&gt;HI, &lt;/P&gt;&lt;P&gt;I think java.time in java 8 doesn't support nanosecond&lt;/P&gt;&lt;P&gt;Send me Love and Kudos&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 13:57:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-Date-columns-with-nanoseconds/m-p/2352491#M118876</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2021-07-05T13:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to load Date columns with nanoseconds</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-Date-columns-with-nanoseconds/m-p/2352492#M118877</link>
      <description>&lt;P&gt;I'ts seems you can workaround with dbtype Timestamp and java Type Object.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 14:03:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-Date-columns-with-nanoseconds/m-p/2352492#M118877</guid>
      <dc:creator>gjeremy1617088143</dc:creator>
      <dc:date>2021-07-05T14:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to load Date columns with nanoseconds</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-load-Date-columns-with-nanoseconds/m-p/2352493#M118878</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;java.sql.Timestamp supports nanosecond for DB, that is a SUN workaround for JDBC, and the date format have to be "yyyy-mm-dd hh:mm:ss.[fff...]"&lt;/P&gt;&lt;P&gt;Since java.util.Date is used in Talend, the micros / nanosecond precision is not available. However some components might check if the incoming Object type is&amp;nbsp;java.sql.Timestamp in which case the nanoseconds are available as well. For this to be leveraged the Object type should be selected in the schema definition, and the source / target components needs to support it.Experiments worth execution&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Using a tFileOutput components dump / read these values. This way the Timezone could be controlled better.&lt;/LI&gt;&lt;LI&gt;Use the -Duser.timezone parameter to see if this changes the behavior.&amp;nbsp;More on this: &lt;A href="https://docs.oracle.com/javase/9/troubleshoot/time-zone-settings-jre.htm#JSTGD359" alt="https://docs.oracle.com/javase/9/troubleshoot/time-zone-settings-jre.htm#JSTGD359" target="_blank"&gt;https://docs.oracle.com/javase/9/troubleshoot/time-zone-settings-jre.htm#JSTGD359&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Consult the JDBC drivers documentation how these timezones are handled.&lt;/LI&gt;&lt;LI&gt;use tLogRow with the following pattern / result:&amp;nbsp;"yyyy-MM-dd'T'HH:mm:ss.SSSXXX"&lt;/LI&gt;&lt;LI&gt;2001-07-04T12:08:56.235-07:00&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Then the target database may or may not able to store the Timestamp part of the above examples, which combined with the timezone could lead to days shifting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Possible Workarounds&lt;/P&gt;&lt;P&gt;Use&amp;nbsp;Strings and see if the database or their driver&amp;nbsp;can handle the transformation. With String what you see is what you have, no extra hidden information.&lt;/P&gt;&lt;P&gt;Convert between timezones using Java code in a tJavaRow&lt;/P&gt;&lt;P&gt;String pattern = "yyyy-MM-dd";&lt;/P&gt;&lt;P&gt;&lt;A href="http://log.info" alt="http://log.info" target="_blank"&gt;log.info&lt;/A&gt;(TalendDate.formatDate(pattern, input_row.startDate));&lt;/P&gt;&lt;P&gt;output_row.startDateUTC =&amp;nbsp;TalendDate.parseDateInUTC("yyyy-MM-dd &lt;B&gt;zzz&lt;/B&gt;", TalendDate.formatDate("yyyy-MM-dd", input_row.startDate)+" &lt;B&gt;UTC&lt;/B&gt;");&lt;/P&gt;&lt;P&gt; Let us know if it helps.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jul 2021 03:54:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-load-Date-columns-with-nanoseconds/m-p/2352493#M118878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-06T03:54:14Z</dc:date>
    </item>
  </channel>
</rss>

