1

I have 100 when-then cases.I am looking for a component in Talend data tool which will help me putting this cases in a simple way. I have tried ternary operator in tmap and also if-else code in tJava. Anything else.

Ankush Rathi
  • 622
  • 1
  • 6
  • 26
  • 3
    I don't such component, but if you give more details maybe the standard component (tmap) will do the job or not... but with tJava you can make your mega switch... but I think that is a wrong pattern. – Mr_Thorynque Jun 29 '16 at 06:51
  • Just write a key value file, and join it with your data flow, and voila ! its a 100 switch case. – 54l3d Jun 29 '16 at 10:07

1 Answers1

0

I added this cases in user-defined routines in the CODE section and called them in tMap.It works besides i did not have any other option to add this cases in tmap,and if i do add directly to tmap, that'd be ugly. So i guess routines are fine.

Ankush Rathi
  • 622
  • 1
  • 6
  • 26