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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
psr
Contributor
Contributor

how to skip every 5th row in a file using talend?

i have a CSV file with 20 rows and i need output by skipping every 5th row and skipped rows i need to move to excel file.

Can you please help me on this?

input file,

------------

 

 

 

 

 

Labels (5)
3 Replies
TRF
Champion II
Champion II

Use a sequence in a tMap with 2 output flows and filter a specific filter for each.

Filters can be based on the result of a division by 5. If rest is 0 or not to decide which flow to go.

psr
Contributor
Contributor
Author

can you please explain with the expression in tmap

Anonymous
Not applicable

It should be something like this....

 

sequence_num%5==0

If the sequence number is divisible by 5 (% is a modulus operator), then the code above will return "true". In which case you can filter the row in your output table.