How to convert this sql case statement for tmap

Highlighted
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

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now