Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
For joining two tables one filed should be comman in between two tables.
For concatenating tables is such kind of condition is there,
what will happen if all fields are different while concatenating two tables.
Is it synbol of good practice for development.
Thanks,
1) For joining two tables one filed should be comman in between two tables.
sometimes no
t1:
load * inline [
f1, f2
1,a
2,b
];
join (t1)
load * inline [
f3, f4
10,aa
20,bb
30,cc
];
2) For concatenating tables is such kind of condition is there,
what will happen if all fields are different while concatenating two tables.
no condition as you can force concat
t1:
load * inline [
f1, f2
1,a
2,b
];
concatenate (t1)
load * inline [
f3, f4
10,aa
20,bb
30,cc
];
Join - Merge rows
In Join, if you dont have common field, then cartesian product happens
Tab1:
Load * Inline [
A,B
1,1
2,2 ];
Join
Load * Inline [
C,D
1,1
2,2 ];
Concatenate - Add rows
Tab2:
Load * Inline [
A1,B1
1,1
2,2 ];
Concatenate
Load * Inline [
C1,D1
1,1
2,2 ];
1) For joining two tables one filed should be comman in between two tables.
sometimes no
t1:
load * inline [
f1, f2
1,a
2,b
];
join (t1)
load * inline [
f3, f4
10,aa
20,bb
30,cc
];
2) For concatenating tables is such kind of condition is there,
what will happen if all fields are different while concatenating two tables.
no condition as you can force concat
t1:
load * inline [
f1, f2
1,a
2,b
];
concatenate (t1)
load * inline [
f3, f4
10,aa
20,bb
30,cc
];
Two different concatenation is there Auto Concatenation and Force Concatenation
Auto Concatenation:
When Qlikview sees the two different tables with same number of fields and same field names. It will concatenated in to single table by itself.
Forced Concatenation:
Using Concatenate keyword before the Load statement. For the non-common fields between two tables will have the NULL value in other table rows.
Hi,
Anbu's post explains difference between join|keep|concatenate.
Concatenating fact tables with some different fields is acceptable for creating sophisticated Data scheme,
it is not out of best practice, just depends on complexity of your ap
Andrei
refer below link for use case difference between the two:
http://qlikviewcookbook.com/2009/11/understanding-join-and-concatenate/
Thanks. Very helpful post!
Regards,
KC