How to convert this sql case statement for tmap

Seven Stars RAJ
Seven 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
Forteen Stars TRF
Forteen 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
Forteen Stars TRF
Forteen 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

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.