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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[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. 
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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. 

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hi  fbonnot,

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?

Best regards
Sabrina
Anonymous
Not applicable
Author

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

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