Looping through values in column

Hello,

I have a table. One of the columsn has some id values. I need to iterate for each value as follows:

  • get the value
  • filter by the value
  • make X
  • get the next value and so on

Table example is:

id | values
22 | 357
22 | 468
24 | 575
24 | 785
26 | 35785
29 | 576

I need to iterate until the end of id column. First get id=22, filter by id=22, make my process, then get next id, which is 24, filter by id=24, make my process… and so on.

Any help please? I am a bit confused with iterations.

Thanks in advance.

If you want to work with a row at a time, use the Chunk Loop or a Window Loop.
If you want to work with an id value at a time (with potentially multiple rows), use a Group Loop.

I am a bit confused with iterations.

What exactly does that mean? What’s confusing you?

2 Likes

I’ve never used them… new to them…

Hello @jquadrada,

did you have any progress with your task? From your description seems you need Group Loop Start node.

Regarding being new to loops - there are a lot of material from which you can learn.

Here you can find out more about Loops from KNIME Docs:
https://docs.knime.com/latest/analytics_platform_flow_control_guide/index.html#loops

Here you can find workflow examples with loops from KNIME Hub:

Here you can find material (videos) on Loops from Data Wranglers Advanced course:
https://www.knime.com/self-paced-course/l2-dw-knime-analytics-platform-for-data-wranglers-advanced/lesson4

And here you can find @armingrudd’s blog post on how to pick a right Loop for you:

Br,
Ivan

1 Like

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