Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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:
col_a | col_b | col_c |
---|---|---|
jhkjhkhkj | jjkjjk | green |
hhih89hyoh | bhbb | red |
col_c | col_x | col_y |
---|---|---|
black | kjlkjlj | vjvjh |
white | bbkbb | bblii |
red | dfyyf | vbkh |
the concatenated tab1 will look like:
col_a | col_b | col_c | col_x | col_y |
---|---|---|---|---|
jhkjhkhkj | jjkjjk | green | ||
hhih89hyoh | bhbb | red | ||
black | kjlkjlj | vjvjh | ||
white | bbkbb | bblii | ||
red | dfyyf | vbkh |
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
col_a | col_b | col_c | col_x | col_y |
---|---|---|---|---|
jhkjhkhkj | jjkjjk | green | ||
hhih89hyoh | bhbb | red | dfyyf | vbkh |
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:
col_a | col_b | col_c |
---|---|---|
jhkjhkhkj | jjkjjk | green |
hhih89hyoh | bhbb | red |
col_c | col_x | col_y |
---|---|---|
red | dfyyf | vbkh |
Thanks GandalfGray.
It is very helpful post.
Thanks once again.
Regards
Venkat
Thanks, It cleared my doubt . . .
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
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.
Please refer the application for above example and check the result by using left join and left keep.
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
est se que ça peux fonctionner avec le keep left !! j'ai essayé mais pas de résultat
je serai reconnaissante