Five Stars

Snowflake Error for timestamps


I am trying to import some data from mySQL to Snowflake. 


My schema from looks like this - the table I created in Snowflake:

CREATE TABLE status_history (
id int primary key,
consignment_id int,
from_status varchar(100),
to_status varchar(100),
created_at timestamp_ntz,
created_by varchar(255),
event varchar(255)


The initial schema of mySQL is this one:

Screen Shot 2018-01-10 at 1.12.09 PM.pngI tried many different Date Patterns, but I was always getting the same error:


Exception in component tJDBCOutput_1 (consignment_status_history_full_load)

net.snowflake.client.jdbc.SnowflakeSQLException: SQL compilation error:

Expression type does not match column data type, expecting TIMESTAMP_NTZ(9) but got TIMESTAMP_LTZ(9) for column CREATED_AT

at net.snowflake.client.jdbc.SnowflakeUtil.checkErrorAndThrowException(

at net.snowflake.client.core.StmtUtil.execute(

at net.snowflake.client.core.SFStatement.executeHelper(

at net.snowflake.client.core.SFStatement.executeQueryInternal(

at net.snowflake.client.core.SFStatement.executeQuery(

at net.snowflake.client.core.SFStatement.executeQuery(

at net.snowflake.client.core.SFStatement.execute(

at net.snowflake.client.jdbc.SnowflakeStatementV1.executeUpdateInternal(

at net.snowflake.client.jdbc.SnowflakePreparedStatementV1.executeBatch(

[statistics] disconnected

at srp.consignment_status_history_full_load_0_1.consignment_status_history_full_load.tMysqlInput_1Process(

at srp.consignment_status_history_full_load_0_1.consignment_status_history_full_load.tJDBCRow_1Process(

at srp.consignment_status_history_full_load_0_1.consignment_status_history_full_load.runJobInTOS(

at srp.consignment_status_history_full_load_0_1.consignment_status_history_full_load.main(



How should I format the timestamps to make it work?

Tags (1)
Five Stars

Re: Snowflake Error for timestamps


I think you are using Snowflake definition of datetime (HH24:MISmiley FrustratedS), 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).


Please see the link above and configuration of your database.