add new rows with data to the existing table

Hi,

How can I join two tables without losing the data in the joined table (I want to preserve the data in the table) whenever news rows with data need to be added to the already joined table? The trick is Table 2 has always  just one row with the same column structure of Table 1, but the data in columns vary. Maybe a good example is adding currency exchange rates to a table everyday while preserving the previous days' data.

Table 1

Row ID                                Dollar                    Euro

27.112014                             A                            B

28.11.2014                            C                            D

Table 2

Row ID                                  Dollar                 Euro

29.11.2014                            E                           F

Table 1 (after join)

Row ID                                Dollar                    Euro

27.112014                             A                            B

28.11.2014                            C                            D

29.11.2014                            E                           F

Table 2

Row ID                                  Dollar                 Euro

30.11.2014                            G                          H

Table 1 (after join)

Row ID                                Dollar                    Euro

27.112014                             A                            B

28.11.2014                            C                            D

29.11.2014                            E                           F

30.11.2014                            G                          H

The correct terminology is not a join, but to concatenate.

It's as no surprise then that the concatenate node is what you need.

if you have multiple tables to concatenate, then use the concatenate optional in node to add in many tables.

simon.

Hi Simon,

yes I can concatenate, but I have to use several concatenate nodes as new tables appear everyday. Is there any way to keep the previously concatenated tables after the concatenate operation and delete all the concatenate nodes from the workflow.

 

Probably you can use recursive loops for this (with a single concatenate). When you would like to add new data, you progress a new step.
 

I solved the problem with the adding of table writer and reader nodes  into the workflow.  This created kind of a loop reading the table at the beginning and then overwriting same table at the end. I can keep the data of previously concatenated table with incorporating just one concatenate node.

Sounds like a good way to do it.

however, if you use the XLS Appender or CSV Writer node, you can choose to append new data to the existing file. This would save you reprocessing the whole table in knime each time.  Instead you would only need to process new data in knime. 

Simon.