I have to process data based on values in csv through tmap component. For instance I have a CSV file with two columns Duty;Timeslots ----------------- D,1 D,2 E,6 E,7 L,5 L,6 F,7 I just want to extract rows with Duty=D and perform transformation. How can I do it in Talend to just bring data with duty D in tmap.
tMap has this built-in to it; it's a matter of adding a filter on the output I'd suggest looking at the documentation for tMap, as it provides an example of this exact scenario: https://help.talend.com/search/all?query=tMap&content-lang=en Basically, you want to add a filter to the output such as "D".compareTo(row1.Duty) == 0
Hi,
Its very simple you just need to follow below steps:
# Double Click on tMap Component
# Click on the "Activate/unactivate expression filter" i.e. highlighted with red in the attached snapshot
# Drag the column (in your case Duty) from the CSV structure (Left Side) & drop it in to expression input box
# Add the conditional statement in front of the column
# In you case row1.duty='D'
# Click on apply & Ok
# For reference have a look on the snapshot attached