Only the first 200


I have a CSV file with 20000 lines.

Is there a possibility and that only the first 200 will be taken over?

What do you mean by ‘taken over’? You need to give a little more detail if you want some help.


When I read out the CSV file, I have 20000 data sets.

Of the 20000 data sets I only need the first 200.

If you are on Linux you could use an Exec node head -200 /full/path/to/file.csv, maybe with a Split node to generate one message per line.


Thank you for your mail.

That must be possible in Node Red. Doing something about an Exec is not the purpose.

Head is a good tool for this job, and the exec node is a good way to use that from Node-RED.

You could use a file in node to read the file in line at a time mode, then a switch node to look as to see the line count and pass on only those less than 200, but it still read in and dump the test of the file , which may not be very efficient .

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.