Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Helo,
Can anyone tell me scenarios when to use Join and when to use Keep ?
tHanks
Dear Nikhil,
Keep and Join works the same way but there is littlebit difference.
Instead of joining the result in the same table, Keep statement keeps the original table and provide us result into another table.
Kind regards,
Ishfaque Ahmed
Hi,
Technically both join and keep are one and the same, the one only difference is the view of the table after join what we see in data model.
In join the tables will be merged into one single table based on the join the data will be present in one single table.
In keep based on the condition the tables will be merger but in data model view we can see separate tables.
Hi,
About Join & Keep are provide similar results, but system performance is better while using KEEP function on a huge data set compare to JOIN function. Number of records gets increased using JOIN as they merge into a single table but coming to KEEP the record count remains same for each table but provides the desired results and they are in denormalized format.
With less amount of data that doesn't varies the performance if we go with JOIN or KEEP.
I hope this might gives some more information.
Regards,
Satish.
Yes, but the actual salary is 600 as per the table, we should not duplicate this, it is wrong to display 1200 instead of 600. This is just an example to understand. If there is many to many mapping between tables then Keep will be very helpful.
Like other user said
- if you have one to many or many to many relationship we should use Keep. Because if we use join we are duplicating data.
A simple example of that would be:
TableA:
load * inline
[
Key,A
1,A1
2,A2
3,A3
];
TableC:
load * inline
[
Key,C
1,C1
1,C11
1,C111
2,C2
4,C4
];
that give use to tables .
When we use a inner joing we are having that:
where of course we are duplicating the A1 value for nothing.
If we use a Keep.
Hope it helps , Enrique