Writing a filtered file to a specific folder depending on the path in a parameter file

I would like to read in a data file and read in a parameter file. The end result I am trying to achieve is to filter out Division A transactions, create an Excel file with just the Division A transactions and put this file in the folder reserved for Division A. I would like to do the same for Division B transactions-- create the excel file for Division B transactions and put it in the folder for Division B using a loop.

In the parameter file, I have the folder path where division A transactions are supposed to go and the same for Division B etc.

When I run my workflow, all the files get created correctly but all the files are created and written to the same folder. I can’t seem to get the loop to iterate properly for the path. Can someone tell me where I am going wrong in the following workflow? Am I using the incorrect start and end loop nodes?

Thanking you all in advance

KNIME_project write filtered files to different folders.knwf (30.2 KB)

hl

Hi @harveylim,

your loop runs only once. The node Table Row to Variable selects only the first row and thus selects only the first group in the Group Loop Start node and also creates only one file path.

Best regards
Andrew

2 Likes

Hi Andrew

Thanks very much for this tip. I moved the Group Loop Start Node earlier in the process and changed a line of code in the rule based row filter node. It now works fine as shown in the workflow.

Cheers,

Harvey

KNIME_project write filtered files to different folders SOLUTION.knwf (29.6 KB)

2 Likes

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