Icon

INFO - Loops Explanation Summary

Special Case

The following nodes pair together.


Start Loop

Start loop nodes are generally interchangeable with any 'Loop End' node and their usage depends on the task.

Group Loop

  • Purpose: Iterates over distinct groups of data based on unique values in one or more columns.

  • Use Case: When you want to process each group of data (e.g., customers, categories, or regions) separately.

Chunk Loop

  • Purpose: Splits the data into fixed-size chunks of rows, regardless of the values in the columns.

  • Use Case: When you want to process subsets of a fixed number of rows at a time.

Generic Loop

  • Purpose: A general-purpose looping mechanism that can be customized to iterate over data or flow variables based on a variety of conditions.

  • Use Case: Use when you need a flexible loop structure that doesn't fit a specific predefined pattern. For example, iterating until a specific data condition is met.

Recursive Loop

  • Purpose: Allows the output of one iteration to become the input for the next iteration, enabling recursive operations.

  • Use Case: Use when you need to iteratively refine results or solve problems like tree traversal or dynamic programming. For instance, repeatedly clustering data until convergence.

Interval Loop

  • Purpose: Iterates over a numerical range in equal intervals.

  • Use Case: Use when you want to process data by incrementing a parameter within a specific range. For example, iterating over a range of temperature values or testing a range of thresholds in a model.

Counting Loop

  • Purpose: Repeats a process a fixed number of times.

  • Use Case: Use when you know the exact number of iterations required. For instance, running a simulation or performing repetitive transformations for a defined count.

Table Tow to Variable Loop

  • Purpose: Iterates over rows in a table, converting the row data into flow variables for use in downstream nodes.

  • Use Case: Use when each row needs to trigger or parameterize a specific action. For example, processing a list of file paths, URLs, or database queries.

Column List Loop

  • Purpose: Iterates over columns in a dataset one by one or in groups.

  • Use Case: Use when you need to process or analyze columns independently. For example, normalizing each column separately or calculating statistics for each column.

Loop End

Variable Condition Loop End

  • Purpose: Ends the loop when a specified flow variable condition is met.

  • Use Case: Use when you want dynamic control over loop termination based on variables. For example, stopping iterations when the accuracy of a machine learning model exceeds a threshold in a Generic Loop.

Variable Loop End

  • Purpose: Aggregates and collects flow variables generated during loop iterations. Does not process or combine tables.

  • Use Case: Use when the goal is to collect variables, such as parameter values, iteration counts, or file paths, generated during the loop. For example, storing computed metrics like maximum values for each group in a Group Loop.

Loop End

  • Purpose: Collects and concatenates the output tables from all iterations into a single table.

  • Use Case: Use when you need to aggregate processed results from a loop into one final dataset. For example, appending data chunks processed in a Chunk Loop or merging results from file processing in a Table Row to Variable Loop.

Recursive Loop End

  • Purpose: Collects the output of recursive iterations and feeds it back to the Recursive Loop Start node, allowing recursive operations to converge or complete.

  • Use Case: Use for problems where the output of one iteration is the input for the next. For example, building a tree structure or repeatedly refining a dataset until a certain condition is met.

Loop End (Column Append)

  • Purpose: Appends the processed results from each iteration as new columns to the original input table.

  • Use Case: Use when each iteration produces a column of results to be added to the original data. For example, adding feature engineering results or model predictions for each loop iteration.

KNIME Loop Types

Group Loop Start
Chunk Loop Start
Generic Loop Start
Counting Loop Start
Interval Loop Start
Column List Loop Start
Recursive Loop Start
Loop End
Table Row to Variable Loop Start
Loop End (Column Append)
Recursive Loop End
Variable Loop End
Variable Condition Loop End

Nodes

Extensions

Links