Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
borke02
Contributor III
Contributor III

Parse error with context variable and date value

Hi,

I'm migrating and testing our Talend jobs to Talend Data Integration v8.0.1. After importing a test job I get the following error:

Null value will be used for context parameter timestamp: Can't parse date string: Unparseable date: "" and long: For input string: ""

After some research and digging into Talend source code I found this message in the file

... studio\plugins\org.talend.designer.codegen_8.0.1.20211103_1602\jet_stub\footer.javajet in line 769.

I found similar code in footer.javajet in the version Talend Open Studio 7.3.1 and 8.0.1M12 (downloaded from sourceforge).

I made another test job with context parameters and different values. The values has to be set with the correct pattern (yyyy-MM-dd HH:mm:ss) or in miliseconds. An empty string or the string "null" results in an error. Is this a correct behaviour? Or should an empty string or the string "null" also be accepted as valid values?

0695b00000bEwnRAAS.png

Regards,

Frank

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hello

Defining a context variable with Date type, it requires a default value, and the date pattern should be "yyyy-MM-dd HH:mm:ss".

 

Regards

Shong

View solution in original post

3 Replies
Anonymous
Not applicable

Hello

Defining a context variable with Date type, it requires a default value, and the date pattern should be "yyyy-MM-dd HH:mm:ss".

 

Regards

Shong

zjing
Contributor III
Contributor III

hello,

context variable, the definition of pattern is obligate. but the value is not obligate if the option nullable is marked

borke02
Contributor III
Contributor III
Author

Hello,

 

thanks shong. I now use the date pattern "yyyy-MM-dd HH:mm:ss" for date values.

 

zjing, where can I mark a context variable as nullable? I can only define name, type, comment and value for context variable. Also I can activate prompt. In my example I only printed out the values of the context variables with the tJava component. And with a wrong or an empty value I get an error.