Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What is exact scenariou for left keep and left join where we should use?

i need comments from who implemented left keep in project

4 Replies
giakoum
Partner - Master II
Partner - Master II

A typical way to use left keep is when you first create the facts table and then want to create the dimensions tables, but only for values that exist in the facts table. In this case you would use left keep, which is actually aleft join but does not affect the table, it creates a new one.

Keep

The keep prefix is similar to the Join prefix. Just as the join prefix, it compares the loaded table with an existing named table or the last previously created data table.

But instead of joining the loaded table with an existing table, it has the effect of reducing one or both of the two tables before they are stored in QlikView, based on the intersection of table data. The comparison made is equivalent to a natural join made over all the common fields, i.e. the same way as in a corresponding join. However, the two tables are not joined and will be kept in QlikView as two separately named tables.

Note!
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.

The keep prefix must be preceded by one of the prefixes Inner, Left or Right. The syntax is:

(inner | left | right) keep[ (tablename ) ]( loadstatement | selectstatement )

Example:

Inner Keep LOAD * FROM abc.csv;

Left Keep SQL SELECT * FROM table1;

tab1:

LOAD * FROM file1.csv;

tab2:

LOAD * FROM file2.csv;

.. .. ..

Left keep (tab1) LOAD * FROM file3.csv;

fkeuroglian
Partner - Master
Partner - Master

See this

Good luck

Fernando

Understanding Join, Keep and Concatenate

Not applicable
Author

ok with answers.but am expecting more like any output regarding no of rows and data integrity and performance and memory usage which one is better for which scenriou.