Appending new column from external file source

I'm creating a new node which internal call an custom external cli tool. The tool then creates a csv file with a rowid column and the new data column. (This complicated flow is required because the library used is in C and 32-bit only).

Question is what is the most efficient way to append this new column? Using ColumnRearanger does not really seem to work in this scenario as far as I can tell. Only idea I had was to read the whole CSV into a Map and then use that Map to get the actual value. But then the whole csv will be in memory (should not really be a problem as this will anyway only be used on small tables).  Still not ideal. Hwo could I read it line by line with Columnrearanger?

What are my other options just copy the table and append new column?


I'd probably created a BufferedTable form the CSV then join this wtih the input table. I think there is a join available? 

I'd take a look but seem to have lost my KNIME dev environment... 



Thanks swebb. That works.

exec.createJoinedTable(inputTable, csvTable, exec);

Where exec is the ExecutionContext and the exec in the method can be any ExecutionMonitor for monitoring sub progress.

The limitation is that both tables (inputTable, csvTable) need to have the same number of rows in the exact same order. Depending on how the csv is created sorting might be needed (not in my case as everything is sequential).