Combine 2 input files into single output WITHOUT lookup?

Nine Stars

Combine 2 input files into single output WITHOUT lookup?

What is the best practice to combine two differently structured input files into a single output file when there is no relationship between the two files?
The tMap component can't have multiple input files, unless you are doing a lookup, which I am not.
The tUnite component must have the same schema for both input files, which is not the case and I don't want the data to be split to multiple rows.
When I add a RowNum column to both files and use tJoin component with Include lookup columns in output column mapping for Col4, Col5, Col6 and Key Definition RowNum Lookup key attribute row2.RowNum I get the desired results.

Is there a better way to do this?


My job:
tFileInputDelimited_1  tJoin_1 tFileOutputDelimited_1
tFileInputDelimited_2

File1:
RowNum,col1,col2,col3
1,aaa,dog,blue
2,bbb,cat,green
3,ccc,bird,red

File2:
RowNum,col4,col5,col6
1,123,456,789
2,999,888,777
3,666,555,444
Desired Output:
RowNum;Col1;Col2;Col3;Col4;Col5;Col6
1;aaa;dog;blue;123;456;789
2;bbb;cat;green;999;888;777
3;ccc;bird;red;666;555;444
Community Manager

Re: Combine 2 input files into single output WITHOUT lookup?

Hi 
From given example, I think you just need to do an inner join based on RowNum column, and generate the output to have all of columns from file1 and file2?
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business