How to convert this sql case statement for tmap

Eight Stars RAJ
Eight Stars

How to convert this sql case statement for tmap

Hi talend folks,

 

How to convert this sql case statement for tmap  

case
when CHL= 'S' then date_trunc('day',"DATE")
end DATE

Thanks
RAJ
Fifteen Stars TRF
Fifteen Stars

Re: How to convert this sql case statement for tmap

Hi,

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.

 

 


TRF
Fifteen Stars TRF
Fifteen Stars

Re: How to convert this sql case statement for tmap

Did this help?
If so, thank's to mark your case as solved.

TRF

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now