Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 🙂 !
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.
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.
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.
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.
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 )
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.
Ah ok thanks a lot i understand better why !