Looping

Hi All

I have a KNIME query about looping.

I have a column that has been split out 'onetomany'. I then have another column in the table that I would like to multiply all of these new columns by, without having 30 'Math Formula' nodes!

Things that I have tried:

1 - Using 'column list start loop' and 'Loop End (column append)' with a math formula node inbetween (with flow variable ports).

2 - Using a java snippet (with flow variable ports).

3 - Using 'splitter' and 'cell replacer' (with flow variable ports).

None of these has worked so far.

If you have a simple method, please enlighten me. If you want more information about what I have already tried, let me know.

(The dataset is very large, so writing it to csv won't work either.)

Thanks

Emily

1. This sounds the way to go.The trick is to use the Column Rename (Regex) to have the same column name in each iteration, After the Math node use the Column Rename to set the orginal column name. Use the Flow Variable tab to assign this name from the variable 'currentColumnName'.

2. Would also work. But you need to create a collection and iterate the values within the Java Snippet. This can be split afterwards. The drawback is that you loose the column names which can be fixed with the Extract and Insert Column Header nodes.

Hope this helps?

Column rename worked a treat! :)

Thanks very much