Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
hillrunner
Contributor II
Contributor II

Automatic join questioning

Hello,  I have a question about joining two tables ( when we have a commun key ) 

When I let clikview does its automatic join for two tables ( so when i don't define join ), qlik doesn't create synthetic keys.

But when i define a join ( right,left...), it takes the whole table which i want to join with the left one and put all the fields as synthetic keys  ( as i showed on photos ) 

But that's the same result at the end ( I mean with the results, I get, the first case is like an outer join ) 

so why is it different ? do i do the join badly ? 

Thanks a lot for reading, if you could explain me why it is different in the schema it would be really kind 🙂

 

 

1 Solution

Accepted Solutions
MayilVahanan

HI @hillrunner 

Either you need to drop table tabEnfants on 42 line.
Or Mention the Left join in 31st line & remove the 40 & 41st line.

MayilVahanan_0-1604797006985.png

I.e. you are loading the table again and joining with NonPersonnes table. So the initial table(tabEnfants) also loaded and then same info joining with first table. That's the reason you're facing the synthetic key.

If you want to join, you can join directly, no need to load the table (tabEnfants) again. If you want to manipulate some info, then you can load the table again and drop the initial load info. 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

4 Replies
MayilVahanan

HI @hillrunner 

Either you need to drop table tabEnfants on 42 line.
Or Mention the Left join in 31st line & remove the 40 & 41st line.

MayilVahanan_0-1604797006985.png

I.e. you are loading the table again and joining with NonPersonnes table. So the initial table(tabEnfants) also loaded and then same info joining with first table. That's the reason you're facing the synthetic key.

If you want to join, you can join directly, no need to load the table (tabEnfants) again. If you want to manipulate some info, then you can load the table again and drop the initial load info. 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
hillrunner
Contributor II
Contributor II
Author

Ah yes i understand better thanks a lot ! There is only one thing left i don't really understand, it is when we let qlikview does the automatic join ( so when i don't explictely ask a join in the script ) 

It shows both tables in the table viewer, with a connection for the commun field, with no synthetic keys ( as showed in linked image ) What does qlik does in this case, it's not a join so ? 

( because when i explictely ask a join [ and delete the temporary table or ask the join between table ], the two tables merge as a join should do ) 

MayilVahanan

HI @hillrunner 

In Qlik, if 2 tables has common field name, it will create a link (Full Join) between both tables. 
Even, if you are not use any join, it will have a link between 2 tables. and you can analysis between 2 tables information. 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
hillrunner
Contributor II
Contributor II
Author

Ah ok thanks a lot i understand better why !