I wonder, is there any way to implement exist logic using PDI like in Query Script below
EXIST (SELECT a.product FROM store a, struck b WHERE b.product = a.product)
to check is the data exist in files (CSV)?
I know PDI has provide design tools like Table Exist
, File Exist
and Check if a column exist
but that tools only work in DB Table and File not data inside the File.
Asked
Active
Viewed 253 times
1

Rio Odestila
- 125
- 2
- 19
-
your question is not clear.. Do your want to compare csv data with table data? – Helping Hand.. Jul 10 '18 at 05:28
-
@WorkingHard.. Well, I have edit the question. – Rio Odestila Jul 10 '18 at 05:49
-
i can't see any changes.. – Helping Hand.. Jul 10 '18 at 06:01
1 Answers
1
You can count the records in the file (or sql, or REST client, or,...) and filter only if it is not zero.

AlainD
- 6,187
- 3
- 17
- 31
-
okay, look at this Script `WHERE x.prdcd IS NOT NULL AND EXISTS (SELECT p.productid FROM product_filter p WHERE x.prdcd = p.productid) AND NOT (x.qty = 0 AND t.productid IS NULL);` and this is what I write `https://imgur.com/a/yN8873X` It's correct? – Rio Odestila Jul 11 '18 at 01:36
-
You only, as data owner, can say if it's true after a test. But it's a rather sqly answer. – AlainD Jul 11 '18 at 09:32