Hi talend folks,
How to convert this sql case statement for tmap
when CHL= 'S' then date_trunc('day',"DATE")
To have the result as a date try this:
row1.CHL == 'S' ? TalendDate.parseDate("dd/MM/yyyy", TalendDate.formatDate("dd/MM/yyyy", row1.yourField))) : row1.yourField
Hope this helps.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Read about OTTO's experiences with Big Data and Personalized Experiences
Pick up some tips and tricks with Context Variables
Take a look at this video about Talend Integration with Databricks