Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Nolgath
Creator
Creator

How to join multiple tables?

I have this script: 

I have same field names and I get AT.make and BE.make, but I just need "make" to be global, I think I can do this with Dealer as the primary key. I've tried "Concat(table_1, '-', dealer) as PrimaryKey2" but this just gives me an error that table_1 does not exist.

table_1:
LOAD
ID,
Country,
make,
dealer,
daysOnline,
FROM [lib://AttachedFiles/all.xlsx]
(ooxml, embedded labels, table is AT);

Table2:
LOAD
ID,
Country,
make,
dealer,
daysOnline,
FROM [lib://AttachedFiles/all.xlsx]
(ooxml, embedded labels, table is BE);

 

Any tips?

Labels (4)
1 Solution

Accepted Solutions
vikasmahajan

Hi,

Use concatenate 

 

table_1:
LOAD
ID,
Country,
make,
dealer,
daysOnline,
FROM [lib://AttachedFiles/all.xlsx]
(ooxml, embedded labels, table is AT);

Concatenate(table_1)
LOAD
ID,
Country,
make,
dealer,
daysOnline,
FROM [lib://AttachedFiles/all.xlsx]
(ooxml, embedded labels, table is BE);

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.

View solution in original post

4 Replies
Lokesh_5045
Creator
Creator

Is table1 is subset of Table2?

vikasmahajan

Hi,

Use concatenate 

 

table_1:
LOAD
ID,
Country,
make,
dealer,
daysOnline,
FROM [lib://AttachedFiles/all.xlsx]
(ooxml, embedded labels, table is AT);

Concatenate(table_1)
LOAD
ID,
Country,
make,
dealer,
daysOnline,
FROM [lib://AttachedFiles/all.xlsx]
(ooxml, embedded labels, table is BE);

Thanks

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
Nolgath
Creator
Creator
Author

I get duplicate values tho now.. why?

Lokesh_5045
Creator
Creator

@Nolgath , try Load distinct .