Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
talendtester
Creator III
Creator III

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:
tFile InputDelimited_ 1  tJoin_1 tFile OutputDelimited_ 1
tFile InputDelimited_ 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
Labels (2)
1 Reply
Anonymous
Not applicable

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