Four Stars

[resolved] What default value should be assgined to date context variable?

Hello ,
My setting for Implicit context load are enabled. So all context variable values are loaded from config file.
In config file, a context variable with date datatype is defined in my configuration file as follows :- 
i.e. last_exe_date== (== is field separator). You can see value is not defined or assigned to variable. 
When I execute the job it throws me error/ message(in bold) as shown below.
Error message on console is :- 
Setting a value for the key "last_exe_date" has failed. Error message: Unparseable date: ""
Info: Parameter "last_exe_date" has not been set by Implicit_Context_Context

Please let me what defualt value I need to assign to this context variable.
Thanks in advance for your help. 
Regards :- 
1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: [resolved] What default value should be assgined to date context variable?

Hi 
If you define the data type as Date, you need to set a default value, eg:
mydate;2017-03-11 00:00:00
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
2 REPLIES
One Star

Re: [resolved] What default value should be assgined to date context variable?

Hi,
If a default value is required, define the variable as a String and convert it in the job, else let it empty (null) and set the value in the job
Community Manager

Re: [resolved] What default value should be assgined to date context variable?

Hi 
If you define the data type as Date, you need to set a default value, eg:
mydate;2017-03-11 00:00:00
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business