Four Stars

Extract X rows of a csv file

 

*sorry for my bad english*

Hello,

I compare 2 numbers of lines of 2 different CSV files with tJava componant, it's work.

When it's true, i make an action, and when it's false, i want to extract the number of rows that correspond...

Like this :

- 1st CSV -> 1200 rows

- 2nd CSV -> 1205 rows

I have a globalMap variable with the difference, 5.

 

And i want to extract the 5 last rows of the 2nd CSV file... But i don't know how can i do it...

Anybody know how to do that?

Thanks Smiley Happy

1 ACCEPTED SOLUTION

Accepted Solutions
Forteen Stars TRF
Forteen Stars

Re: Extract X rows of a csv file

Assume your 1rst file correpsonds to tFileInputDelimited_1, use
((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) to set the head field of your tFileInputDelimited_2 component

TRF
2 REPLIES
Forteen Stars TRF
Forteen Stars

Re: Extract X rows of a csv file

Assume your 1rst file correpsonds to tFileInputDelimited_1, use
((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE")) to set the head field of your tFileInputDelimited_2 component

TRF
Four Stars

Re: Extract X rows of a csv file

hehe it works !

Thank you !