Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to segregate / filter rows in excel/csv

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.

Regards
Labels (3)
2 Replies
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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

Best Regards,
Mayur