How can I set the lookup stage adding an OR as Condition

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ANDOPEPENANDO
Participant
Posts: 5
Joined: Fri Feb 17, 2017 8:48 am
Location: Jalisco

How can I set the lookup stage adding an OR as Condition

Post by ANDOPEPENANDO »

I need to compare 2 fields in the same file and reject the records were exists at least in one of the two validations:

Condition:
(LnkFix.Customer_Name > 0) Or (LnkFix.Customer_Name > 0) <-- are not working
Condition Not Met: Reject
Lookup Failure: Reject

Thanks in advance for your help.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

A little lost... not seeing any differences in the expressions on either side of the OR. Is your condition correctly transcribed from the job? :?

Never mind the whole concept of what exactly you are comparing the "2 fields" to in the lookup is unknown. Can you make another attempt at explaining what your requirement is in words, what it is you need to do? Thanks.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ANDOPEPENANDO
Participant
Posts: 5
Joined: Fri Feb 17, 2017 8:48 am
Location: Jalisco

Post by ANDOPEPENANDO »

Hi.
Sorry, my wrong. The example is:
Condition:
(LnkFix.Customer_Name > 0) Or (LnkFix.Customer_Mail > 0) <-- are not working
Condition Not Met: Reject
Lookup Failure: Reject

The thing I want to do is filter a record as invalid if it matches either of the two keys in the lookup.

For example; In the primary flow I have customer data, in the reference I have a list of undesirable candidates (names or emails), if you find any of the two values, the record should be rejected. In the normal case, the lookup works when both columns matched (like an AND conditioner) I was expecting work it as an Or, Is this possible?

Thank you for your time.
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

2 distinct lookup keys means 2 lookups:

Code: Select all

Lookup1 -- reject link --> Lookup 2 -- reject link --> Additional Processing
  |                          |
  | success link             | success link
  |                          |
Trash                      Trash
Since you want to drop your matches, you would use the reject links for continued processing.

Mike
Post Reply