The "csv file reader" node reads a file that is specified during the configuration of the node.
I want to read a list of files, then loop over them. To do this what I need is a csv reader that takes the file name as an input argument, or a list of filenames like that produced by the "List Files" node, and then can read and process each of them in a loop.
Is there a way to accomplish this? It seems like this should be an automatable task, but the nodes don't appear to support it.
I think what you are trying to do seems reasonable enough. I have assembled a short test workflow (Knime 2.4.0 - see attached file including dummy data) to demonstrate the following:
List Files ->(data out) ##Selects all of the .xls files in a particular folder by file extension##
(data in)-> TableRow to Variable Loop Start ->(flow variable out) ##Starts the loop##
(flow variable in)-> XLS Reader ->(data out) ##Set the Location field to use the Location variable coming in##
(data in)-> Java Snippet ->(data out) ##Example of doing something with the file - in this case counts the rows##
(data in)-> TableRow to Variable -> (flow variable out) ##Passes the first row out as variable (also keeps the original variables that were being passed along##
(flow variable in)-> Variable to TableRow ->(data out) ##Selects and passes out just the location and row count info##
(data in)-> Loop End ->(data out) ##Ends the loop and concatenates each row corresponding to each input xls file##
I believe 2.4.0 now comes with the .ini defaulting to expert mode, so you should see the flow control nodes, and the show/hide flow variable ports options when you right-click nodes.
Obviously, the same approach can be used for any file type. Hope this helps!
I am new to KNIME, I was using WEKA before. I have a CSV training file with class value in it, can I use KNIME for classification of my training and testing csv files?. Please let me know. Thank you in advance.