I have a small problem which I though I could solve easily but somehow feel like I don’t see the obvious solution.
I have a file with 15,000+ line items. I want KNIME to go throught that file and export 500 line items at a time into a text file (txt), numbering it accordingly (like 00500.txt, 01000.txt, 01500.txt etc.)
I tried a combination of chunk loop start and excel / csv writer but have faced two problems.
How to extract the current chunk for file naming purposes
all the writer nodes have only an input but no output so how could they be looped?
You can use the workflow variables to get the iteration. With these you can also use a variable loop end, hence you do not need a physical endpoint.
I have attached a workflow with a mockup dataset.
Feel free to ask if you need help. The variable edit node can be also replace by other edit nodes in case you do not want python or are familiar with other nodes already.