Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a problem with the "exist" function. My data are in the excel files and I want to use where exist clause in order to eliminate some of the lines in Table B which are not matching with the table A. I wrote a script as below.
A:
LOAD
person_id,
person_id as PersonId,
person_name
FROM
(ooxml, embedded labels, table is Sheet1);
B:
LOAD
id as person_id,
country
FROM
(ooxml, embedded labels, table is Sheet1) where Exists(person_id) ;
I am glad if you correct my script.
Thanks
The solution provided by Ioannis will work and do exactly what you want. But there is an alternative way to do this, that often is faster:
A:
LOAD
person_id,
person_id as PersonId,
person_name
FROM
B:
Left Keep (A)
LOAD
id as person_id,
country
FROM
HIC
A:
LOAD
person_id,
person_id as PersonId,
person_name
FROM
(ooxml, embedded labels, table is Sheet1);
B:
load
person_id,
country
where Exists(person_id) ;
LOAD
id as person_id,
country
FROM
(ooxml, embedded labels, table is Sheet1) ;
The solution provided by Ioannis will work and do exactly what you want. But there is an alternative way to do this, that often is faster:
A:
LOAD
person_id,
person_id as PersonId,
person_name
FROM
B:
Left Keep (A)
LOAD
id as person_id,
country
FROM
HIC