Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am facing an issue with Date Column conversion.
I have multiple date column "YYYY-MM-DD"
Flow of Talend job
Input (.txt file)-->tmap-->Snowflake table.
I have done variable conversion in tmap :
TalendDate.isDate(row5.Column0,"yyyy-MM-dd") ? TalendDate.parseDate("yyyy-MM-dd", row5.Column0) : null
I am facing runtime error:
Input String : NULL
Please help me to resolve this.
Hey ,
Thanks for your help.
Worked fine with the below code :
TalendDate.isDate(row5.Column0,"yyyy-MM-dd hh:mm:ss.SSS") ? TalendDate.parseDate("yyyy-MM-dd hh:mm:ss.SSS", row5.Column0) : null
I guess the issue was with other columns .
Thank you.
this error only comes when your input string is null.
Hi,
Please add a null condition check as the first step to avoid the error. Sample code is as below.
!Relational.ISNULL(row5.Column0)?
(TalendDate.isDate(row5.Column0,"yyyy-MM-dd") ? TalendDate.parseDate("yyyy-MM-dd", row5.Column0) : null) : null
If the suggestion given has helped you, could you please mark the topic as solution provided?
Warm regards,
Nikhil Thampi
Hey ,
Thanks for your help.
Worked fine with the below code :
TalendDate.isDate(row5.Column0,"yyyy-MM-dd hh:mm:ss.SSS") ? TalendDate.parseDate("yyyy-MM-dd hh:mm:ss.SSS", row5.Column0) : null
I guess the issue was with other columns .
Thank you.