[resolved] Extract sample rows from delimited input file
Hello
From one delimited input file (csv with X rows) I would like to extract a sample file with one row out of each 200.
Is there a component that will let me do this ?
If so, I think i'll have to get the number of line from input file with globalvar NBLINE, and add a modulus 200 (%200)
Thanks a lot.
Do you need random rows then use Advance Setting--> "Extract Line at Random"
this can provide you random rows from your input file. use limit option to control the number of lines needed.
Do you want to extract the first 200 rows or any 200 rows in input file? If former, you can use "Header", "Footer" and "Limit" option in tfileinputdelimited component to control
the number of lines needed.
If you want to extract any 200 rows in your input file, could you please take a look at a related forum: https://community.talend.com/t5/Design-and-Development/resolved-how-to-read-data-from-text-file-from... to see if it is what you are looking for?
Do you need random rows then use Advance Setting--> "Extract Line at Random"
this can provide you random rows from your input file. use limit option to control the number of lines needed.
Hi Thank you very much for your answers. I needed a random output so I'll use the built in feature of the fileinputdelimited componant (lazy me ! could have found it alone) Bye