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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Merging two tables

suppose I have excel file like table1 as

name    branch         age          email

aaa       computer        20         a@gmail.com

bbb       civil                 27         b@gmail.com

ccc        IT                   32          c@gmail.com

 

and another excel file table2 as

name      age

ppp           26

qqq           28

 

now i want to join this but here is no any common data

output should be like

 

name    branch         age          email

aaa       computer        20         a@gmail.com

bbb       civil                 27         b@gmail.com

ccc        IT                   32         c@gmail.com

ppp       null                 26         null

qqq       null                 28         null

Labels (2)
11 Replies
manodwhb
Champion II
Champion II

Anonymous
Not applicable
Author

You should perform a FULLJOIN between the files , A leftjoin B union B leftjoin A .

manodwhb
Champion II
Champion II

@Pankaj18,still do you have issue?

TRF
Champion II
Champion II

Use a single tMap to adjust 2nd schema on 1rst one, then use a tUnite to concatenate both flows:

0683p000009Lzye.png

Here tFileInputExcel is replaced by tFixedFlowInput for the example.

And the result is:

.----+--------+---+-----------.
|         tLogRow_57          |
|=---+--------+---+----------=|
|name|branch  |age|email      |
|=---+--------+---+----------=|
|aaa |computer|20 |a@gmail.com|
|bbb |civil   |27 |b@gmail.com|
|ccc |IT      |32 |c@gmail.com|
|ppp |null    |26 |null       |
|qqq |null    |28 |null       |
'----+--------+---+-----------'
Anonymous
Not applicable
Author

TRF ,

 

But its not correct to unite two different schemas right ?

 

Thanks .

Anonymous
Not applicable
Author


@praveenvm wrote:

TRF ,

 

But its not correct to unite two different schemas right ?

 

Thanks .


You can quite easily make the schemas the same before you connect to the tUnite. 

TRF
Champion II
Champion II

@praveenvm, that's the reason why I started my answer with "Use a single tMap to adjust 2nd schema on 1rst one".

Anonymous
Not applicable
Author

@TRF , Ya agreed . But if we are just using the fileExcel instead of your fixedflowinput then it is adjusting the file (adding the missing columns in the file itself) and not adjusting the schema alone right ? Because even if we adjust the schema alone , that would still result in column data mismatch as talend matches file columns and schema columns by matching the order of columns and not my column names. 

 

Thanks.

TRF
Champion II
Champion II

@praveenvm, all input schemas must be identicals to use tUnite which is required for the usecase.