<?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 Snowflake Error for timestamps in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Snowflake-Error-for-timestamps/m-p/2303857#M143787</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am trying to import some data from mySQL to Snowflake.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My schema from looks like this - the table I created in Snowflake:&lt;/P&gt; 
&lt;P&gt;CREATE TABLE status_history (&lt;BR /&gt;id int primary key,&lt;BR /&gt;consignment_id int,&lt;BR /&gt;from_status varchar(100),&lt;BR /&gt;to_status varchar(100),&lt;BR /&gt;created_at timestamp_ntz,&lt;BR /&gt;created_by varchar(255),&lt;BR /&gt;event varchar(255)&lt;BR /&gt;);&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The initial schema of mySQL is this one:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-01-10 at 1.12.09 PM.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lrwv.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157090i112324BD69D37E65/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lrwv.png" alt="0683p000009Lrwv.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;I tried many different Date Patterns, but I was always getting the same error:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;Exception in component tJDBCOutput_1 (consignment_status_history_full_load)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error:&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;Expression type does not match column data type, expecting TIMESTAMP_NTZ(9) but got TIMESTAMP_LTZ(9) for column CREATED_AT&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowException(SnowflakeUtil.java:88)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.core.StmtUtil.execute(StmtUtil.java:384)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.core.SFStatement.executeHelper(SFStatement.java:421)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.core.SFStatement.executeQueryInternal(SFStatement.java:240)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:180)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:152)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.core.SFStatement.execute(SFStatement.java:637)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.jdbc.SnowflakeStatementV1.executeUpdateInternal(SnowflakeStatementV1.java:135)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.jdbc.SnowflakePreparedStatementV1.executeBatch(SnowflakePreparedStatementV1.java:1045)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;[statistics] disconnected&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at srp.consignment_status_history_full_load_0_1.consignment_status_history_full_load.tMysqlInput_1Process(consignment_status_history_full_load.java:1426)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at srp.consignment_status_history_full_load_0_1.consignment_status_history_full_load.tJDBCRow_1Process(consignment_status_history_full_load.java:694)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at srp.consignment_status_history_full_load_0_1.consignment_status_history_full_load.runJobInTOS(consignment_status_history_full_load.java:2015)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at srp.consignment_status_history_full_load_0_1.consignment_status_history_full_load.main(consignment_status_history_full_load.java:1609)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#000000"&gt;How&amp;nbsp;should I format the timestamps to make it work?&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 08:52:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T08:52:53Z</dc:date>
    <item>
      <title>Snowflake Error for timestamps</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Snowflake-Error-for-timestamps/m-p/2303857#M143787</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am trying to import some data from mySQL to Snowflake.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My schema from looks like this - the table I created in Snowflake:&lt;/P&gt; 
&lt;P&gt;CREATE TABLE status_history (&lt;BR /&gt;id int primary key,&lt;BR /&gt;consignment_id int,&lt;BR /&gt;from_status varchar(100),&lt;BR /&gt;to_status varchar(100),&lt;BR /&gt;created_at timestamp_ntz,&lt;BR /&gt;created_by varchar(255),&lt;BR /&gt;event varchar(255)&lt;BR /&gt;);&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The initial schema of mySQL is this one:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2018-01-10 at 1.12.09 PM.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lrwv.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157090i112324BD69D37E65/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lrwv.png" alt="0683p000009Lrwv.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;I tried many different Date Patterns, but I was always getting the same error:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;Exception in component tJDBCOutput_1 (consignment_status_history_full_load)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error:&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;Expression type does not match column data type, expecting TIMESTAMP_NTZ(9) but got TIMESTAMP_LTZ(9) for column CREATED_AT&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowException(SnowflakeUtil.java:88)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.core.StmtUtil.execute(StmtUtil.java:384)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.core.SFStatement.executeHelper(SFStatement.java:421)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.core.SFStatement.executeQueryInternal(SFStatement.java:240)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:180)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.core.SFStatement.executeQuery(SFStatement.java:152)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.core.SFStatement.execute(SFStatement.java:637)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.jdbc.SnowflakeStatementV1.executeUpdateInternal(SnowflakeStatementV1.java:135)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at net.snowflake.client.jdbc.SnowflakePreparedStatementV1.executeBatch(SnowflakePreparedStatementV1.java:1045)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;[statistics] disconnected&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at srp.consignment_status_history_full_load_0_1.consignment_status_history_full_load.tMysqlInput_1Process(consignment_status_history_full_load.java:1426)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at srp.consignment_status_history_full_load_0_1.consignment_status_history_full_load.tJDBCRow_1Process(consignment_status_history_full_load.java:694)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at srp.consignment_status_history_full_load_0_1.consignment_status_history_full_load.runJobInTOS(consignment_status_history_full_load.java:2015)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#FF0000"&gt;at srp.consignment_status_history_full_load_0_1.consignment_status_history_full_load.main(consignment_status_history_full_load.java:1609)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;FONT size="3" color="#000000"&gt;How&amp;nbsp;should I format the timestamps to make it work?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 08:52:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Snowflake-Error-for-timestamps/m-p/2303857#M143787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T08:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Snowflake Error for timestamps</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Snowflake-Error-for-timestamps/m-p/2303858#M143788</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://docs.snowflake.net/manuals/user-guide/date-time-examples.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.snowflake.net/manuals/user-guide/date-time-examples.html&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;I think you are using Snowflake definition of datetime&amp;nbsp;(HH24:MI&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9p6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134116iFBD5D7F21624A744/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9p6.png" alt="0683p000009M9p6.png" /&gt;&lt;/span&gt;S), but you should use Java notation in the component (HH:mm:ss) and add there a timezone shift (e.g. -0500 which is "-Z" in Java notation).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please see the link above and configuration of your database.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards&lt;/P&gt; 
&lt;P&gt;Lojdr&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2018 18:58:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Snowflake-Error-for-timestamps/m-p/2303858#M143788</guid>
      <dc:creator>lojdr</dc:creator>
      <dc:date>2018-01-11T18:58:54Z</dc:date>
    </item>
  </channel>
</rss>

