How to append columns to other columns in Talend?

1.2k views Asked by At

I have two hash inputs, each has completely different columns. Say hashInput_1 has columns called

One | Two | Three | Four | Five

and hashInput_2 has columns called:

Six | Seven | Eight

Each hash input has the same number of rows. I just need to combine them into one excel document or flow so that the columns and all of the data gets correctly joined. I know talend can append rows, but I need to append columns so that the new schema is columns One | Two | Three | Four | Five | Six | Seven | Eight with all of the data in the appropriate columns.

1

There are 1 answers

1
Théo Capdet On BEST ANSWER

You need to add one more column ID in each of the schema of hashinput.

In the lookup increment this column with a sequence. (See in tjavarow code).

In the tmap increment another sequence and do a join betwen the two ID column.

So first line of one hashinput (ID 1) will join first line other hashinput (ID 1).

enter image description here enter image description here enter image description here