Icon

2019_​10_​03_​Comparing_​Two_​Tables

Compare Two Tables
Compare two TablesThis workflow compares 2 tables with same structure meaning they have same number of columns and matchingcolumns have same names and types. Comparison is done in a loop using Column Comparator node. In each loopiteration two columns are compared and and additional column with values TRUE or FALSE is created.Forum link: https://forum.knime.com/t/data-set-comparison/18507https://forum.knime.com/t/compare-content-of-multiple-columns-in-pairs-of-two/15950 Table ATable BCompare columnsJoin all column that need comparisonGet column namesStart loop for each pair of columnsTranspose to get names in one columnFilter so it only leaves two columnsAppend columnsCreate flow variable for second column nameColumn headers to columnsColumn headers to collectionCollection column to flow variable collection Table Creator Table Creator Column Comparator Joiner ExtractColumn Header Table Row ToVariable Loop Start Transpose Column Filter Loop End (ColumnAppend) String Manipulation(Variable) Variable toTable Row Create CollectionColumn Table Rowto Variable Compare two TablesThis workflow compares 2 tables with same structure meaning they have same number of columns and matchingcolumns have same names and types. Comparison is done in a loop using Column Comparator node. In each loopiteration two columns are compared and and additional column with values TRUE or FALSE is created.Forum link: https://forum.knime.com/t/data-set-comparison/18507https://forum.knime.com/t/compare-content-of-multiple-columns-in-pairs-of-two/15950 Table ATable BCompare columnsJoin all column that need comparisonGet column namesStart loop for each pair of columnsTranspose to get names in one columnFilter so it only leaves two columnsAppend columnsCreate flow variable for second column nameColumn headers to columnsColumn headers to collectionCollection column to flow variable collection Table Creator Table Creator Column Comparator Joiner ExtractColumn Header Table Row ToVariable Loop Start Transpose Column Filter Loop End (ColumnAppend) String Manipulation(Variable) Variable toTable Row Create CollectionColumn Table Rowto Variable

Nodes

Extensions

Links