Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
JSD03
Contributor III
Contributor III

Unable to load time value into Snowflake table

Hello,

I'm unable to load a time value into a Snowflake table (field defined wth the type "time"). Im' using Talend ESB 8.0.1.

Is there a way to achieve that?

I've tried many things:

  • java Date type with Date schema (and HH:mm:ss pattern)
  • Java Time type with Object schema
  • java String type with String schema (after having transformed the value with TalendDate.formatDate function)

But I always get the same error message : SEVERE: State: COPY_INTO_TABLE, COPY INTO "MYTABLE_20220128_113324_058_2" FROM '@~/MY_TABLE/INSERT/20220128_113324_058_BCUCOG_2' on_error='ABORT_STATEMENT' file_format=( field_optionally_enclosed_by='"' empty_field_as_null=true), Time '1970-01-01 15:45:00.000+01:00' is not recognized

It seems that Talend send anyway a Date.

Thanks for your help

Labels (3)
18 Replies
JSD03
Contributor III
Contributor III
Author

My java version is 11.0.13 (on windows).

 

In the job I have sent to you I use a simple tFixedFlowInput to generate a fake row and it fails also so the source is not the root cause (in the real job the source is also a snowFlake table)

Anonymous
Not applicable

You sent me a job with 3 custom routines that don't appear to be being used in the job. However, they are in the "import" section and one was missing (CustomString). Once I sorted that missing routine reference, the job you sent me just worked. Incidentally, what are the routines used for and why were they included?

JSD03
Contributor III
Contributor III
Author

The routines are not needed (I don't know why they were exported)

Anonymous
Not applicable

Sorry about the delay in getting back to you. As I said, I have not been able to recreate this with the job you sent me. The only thing I can think of to suggest is to reinstall the Studio and try this from another installation. I know this is not ideal, but I cannot recreate this issue in the Enterprise Edition or the TOS ESB version that you are using.

JSD03
Contributor III
Contributor III
Author

Hello,

 

After a fresh installion of Talend it's not better: still the exact same error. The only difference between you and me is the operating system. Do you think you could try on Windows?

Anonymous
Not applicable

I'm afraid I do not have access to a Windows machine right now. I wouldn't have expected the OS to make a significant difference here though. All of the libraries used to communicate with Snowflake will be the same.

 

Would it be possible for you to compile the test job you sent me and try it on another machine to see what happens? I'll see if I can do the same with a colleague of mine using a Windows machine.

JSD03
Contributor III
Contributor III
Author

I have generated the job (you just have to complet the context value in "Default.properties" file).

Anonymous
Not applicable

OK, I have just got a colleague to test this and he can't recreate your issue either. He is on Windows. Were you able to get it tested on another machine where you are? If (on another machine) you get the same issues, the only difference we have is our Snowflake instances.

Anonymous
Not applicable

Sorry, I missed this. I cannot test that I am afraid. I am not permitted to run precompiled code against our internal systems. Sorry. Can you get a colleague to run it for you to test?