Difference between Union & Intersection in the CSV Reader Node under the Transformation section.

Knime 4.7.7- Please show me an example workflow clearly illustrating the difference between the two radio button options mentioned in the title when I point my CSV Reader node to a local path containing 2 CSV files using the ‘Files in Folder’ option.

Hello @nallich ,

welcome to the KNIME forum.
Let me show you a small example. You have two tables:
Table 1 has columns A, B, and C.
Table 2 has columns B, C, and D.

The Union outputs all columns that are part of any table, i.e., A, B, C, and D.
The Intersection outputs only columns that are part of all tables, i.e., B, and C.

I hope that answers your question.

Have a nice day,
nan

1 Like

Hi @nan ,

Thank you for the quick reply. My Table 1 has columns A, B, C, D. Table 2 has columns A, B, C. Neither union nor intersection is working for me. CSV Reader Node > Configure > Settings Tab > I am seeing an error message in the Preview section which says "The following columns are not contained in all source files: [D]. How should I troubleshoot this node?

Hmm, looks like I figured this one out myself! CSV Reader Node > Advanced Settings > Options for Multiple Files > Uncheck ‘Fail if specs differ’. This solves it. Hope this helps someone.

6 Likes

Right, didn’t think about that setting when answering your question. We plan to merge the two settings into one when transitioning the node to modern UI (internal reference UIEXT-1800), though did not get to it yet.

Happy that you found the solution and thanks for raising awareness,
nan

1 Like

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