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

Concatenate,Left Join, Left Keep

Hi all,

Can i know the main difference between Concatenate, Left Join, Left Keep.

Please can anyone share your knowledge with some examples.

That will be more easy to understand.

Regards

Venkat

6 Replies
gandalfgray
Specialist II
Specialist II

Concatenation

tab1:

Load col_a, col_b, col_c from ...;

Concatenate (tab1)

Load col_b, col_x, col_y from ...;

Concatenation adds the records from the load to a previously loaded table (tab1) in the example.

There will be one table (named tab1 in the example) containing all fields from the "original" tab1, and any new fields from the second load,

so assuming two records was in the original tab1, and three new comes fro the second load:

original tab1

col_acol_bcol_c
jhkjhkhkjjjkjjkgreen
hhih89hyohbhbbred

second load

col_ccol_xcol_y
blackkjlkjljvjvjh
whitebbkbbbblii
reddfyyfvbkh

the concatenated tab1 will look like:

tab1

col_acol_bcol_ccol_xcol_y
jhkjhkhkjjjkjjkgreen

hhih89hyohbhbbred



blackkjlkjljvjvjh


whitebbkbbbblii


reddfyyfvbkh

Left Join

tab1:

Load col_a, col_b, col_c from ...;

Left Join (tab1)

Load col_b, col_x, col_y from ...;

A join adds the fields from the load to a previously loaded table.

If prefixed with Left  (Left Join)  the resulting table only contains combination with a full data set from the first table.

In this case the result will be

tab1

col_acol_bcol_ccol_xcol_y
jhkjhkhkjjjkjjkgreen

hhih89hyohbhbbreddfyyfvbkh

Left Keep

tab1:

Load col_a, col_b, col_c from ...;

tab2:

Left Keep (tab1)

Load col_b, col_x, col_y from ...;

A keep reduces one or both of the involved tables depending on the prefix left/right/inner.

(Both tables are kept, so there will be no concatenation or join)

If prefixed with Left  (Left Keep)  the second table only contains combination with connection to the data set from the first table.

In this case the result will be:

tab1

col_acol_bcol_c
jhkjhkhkjjjkjjkgreen
hhih89hyohbhbbred

tab2

col_ccol_xcol_y
reddfyyfvbkh
Not applicable
Author

Thanks GandalfGray.

It is very helpful post.

Thanks once again.

Regards

Venkat

prasad_dumbre
Partner - Creator
Partner - Creator

Thanks, It cleared my doubt . . . 

Anonymous
Not applicable
Author

Excellent but i believe must be:

tab1:

Load col_a, col_b, col_c from ...;

Left Join (tab1)

Load col_c, col_x, col_y from ...;

is col_c and not col_b

thanks

rohan_mulay
Partner - Creator
Partner - Creator

Consider an example:

Test1:

LOAD * INLINE [

    ID,Salary,l1,l2

    a,1,1,1

    b,2,3,3

    c,1,2,2

];

Test2:

Left keep (Test1)

Load * Inline [

      ID,F3

      a,2

      a,3

      a,4

      b,1

      ];

Refer the screen shot. Check the explanation in the screen shot below.screenshot.JPG.jpg

Please refer the application for above example and check the result by using left join and left keep.

ghilenasma
Contributor III
Contributor III

Bonjour 

 

j'ai un modèle en étoile ou j'ai 2 table qui ont le même article je veux avoir les reste des article art2 et art3 comme l'image suivante 

C.PNGest se que ça peux fonctionner  avec le keep left   !!  j'ai essayé mais pas de résultat

 

je serai reconnaissante