Icon

Exercise3

There has been no title set for this workflow's metadata.

Chapter 6 / Exercise 3

In this exercise, we clean up a file from duplicates.
The easiest way would be to use a GroupBy node, group by contract IDs and take only the first item in the group.
A more complex way would be using a group loop.
But we choose the most complex way of all, through a TableRow to Variable Loop Start just to show how the TableRow to Variable Loop works.

Annotations and comments
  • Workflow: Chapter 7/Exercise 3 In this exercise, we clean up a file from duplicates. The easiest way would be to use a GroupBy node, group by contract IDs and take only the first item in the group. A more complex way would be using a group loop. But we choose the most complex way of all, through a Table Row to Variable Loop Start just to show how the Table Row to Variable Loop works.
  • Note Since KNIME has been thought in terms of data table, loops are rarely needed. Before using a loop make sure that a dedicated node for what you have in mind does not exist!
  • Wrong sales file with duplicated contract number. One row is missing the "amount" and "quantity" values.
  • keep only "contract nr"
  • list of "contract nr"
  • remove duplicates by grouping on contract nr and using First for aggregation
  • filter by "contract nr"
  • only 1st row most recent load_date to remove duplicates
  • contract nr are not unique RowID on contract nr fails
  • now check again uniqueness on "contract nr"
  • sort ascending on load_date
  • start loop on "contract nr" one by one

Nodes

Extensions

Links