Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

When we will use Keep and Join with scenarios

Hi All,

Please explain When we will use Keep and Join? But i want a real time scenarios for both Keep and Join not a theory?

Left keep and left join gives the same output.the only difference is :

->> keeps the table separate in data model.

-->>joins the two tables and make it one table.

8 Replies
tresesco
MVP
MVP

Check if this thead and docs attached there could help: Re: When will use join & Keep

Not applicable
Author

Hi Treseco,

I saw the above thread,They are not explained clearly. But you know anything about those please share here.

avinashelite

* Join : If you use join than both the tables will get combine and it will form the single table if the joining keys have duplicates than the data size may get increase.


EG: say if you have table A with 100K data with 10 Fields  and Table B with 1K data with 3 fields  , both are linked with a common key


if you use join on A and B then you will end in loading 3 fields with 10 fields i.e 3 fields data will get replicated across all the 100K data and data size will increase more but if you use Keep it wont merge the tables but still the data will reduce


"The explicit Join prefix in QlikView script language performs a full join of the two tables. The result is one table. In many cases such joins will result in very large tables. One of the main features of QlikView is its ability to make associations between multiple tables instead of joining them, which greatly reduces memory usage, increases processing speed and offers enormous flexibility. Explicit joins should therefore generally be avoided in QlikView scripts. The keep functionality was designed to reduce the number of cases where explicit joins needs to be used. "

tresesco
MVP
MVP

Let me try to explain.

You might have two bery big tables, one with 1 billion records ans the second one with 1 billion and 10,000 records. The tables have a common ID field and all rest 100 fields uncommon. 1 billion records in both the tables are associated with common ID field whereas 10,000 records (unmatched IDs) in second table - you don't need. So, in first thought you think of joining (inner join) the tables to get rid of those 10,000 redundunt records. However, since this joining would create a single very big table, it will consume a lot of RAM and reduce speed while processing and you might not be able to afford that.  But, you need to get the result and QV gives you the flexibility of not joining the tables into one and still get the rid of unwanted records (or, so for other scenarios) - use Keep. Because, even if you don't join the tables, using the ID as Key the tables would be associated and QV would work as expected.

Hope this gives you an idea.