Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I am still a newbie to Qlik, so please bear with my stupid questions.
I have two tables (TABLE1 and TABLE2) that coming from 2 different data sources that can be linked by one key. TABLE2 is a super set of TABLE1, ie all keys in TABLE1 will be found in TABLE2, but TABLE2 contains more keys than TABLE1.
What I want to do is to load them, join by this key and keep them in two separate tables within Qlik. From what I have read in Qlik's reference manual, what I need is an "OUTER KEEP", but that doesn't seem to be allowed.
Graphically:
TABLE1:
Key | Field1 | Field2 |
---|---|---|
1 | aa | bb |
2 | dd | ee |
TABLE2:
Key | Field |
---|---|
1 | hh |
2 | kk |
3 | ll |
4 | oo |
5 | pp |
I need both tables loaded (IN FULL), linked by key, but separated.
Is this possible?
Kind regards
Not sure if you want Table1 to have ID 3, 4, 5 with field1 and Field2 as Nulls?
May be this:
Table1:
LOAD Key,
Field1,
Field2
FROM
[https://community.qlik.com/thread/215100]
(html, codepage is 1252, embedded labels, table is @1);
Concatenate(Table1)
LOAD Key
FROM
[https://community.qlik.com/thread/215100]
(html, codepage is 1252, embedded labels, table is @2)
Where not Exists(Key);
Table2:
LOAD Key,
Field
FROM
[https://community.qlik.com/thread/215100]
(html, codepage is 1252, embedded labels, table is @2);
or are you just looking to have a connection between the two (and not include the extra ids?) If that is the goal, you don't need to do anything. Just load them and the connection will be automatically formed because they are named the same.
Table1:
LOAD Key,
Field1,
Field2
FROM
[https://community.qlik.com/thread/215100]
(html, codepage is 1252, embedded labels, table is @1);
Table2:
LOAD Key,
Field
FROM
[https://community.qlik.com/thread/215100]
(html, codepage is 1252, embedded labels, table is @2);
Thanks!
What I ended up doing, since Table B is a superset of Table A, I simply loaded Table B firstly then "left keep TableA"...
Please apologise for the very stupid question.
There is also the option to "Right Keep" if you need to conserve the load order of Table A and Table B (eg, if you have to load Table A first), and Table B is a superset of Table A