Rejected records from both Primary and Reference table

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
mc_harsha
Premium Member
Premium Member
Posts: 32
Joined: Mon Mar 06, 2006 5:44 am
Location: bangalore

Rejected records from both Primary and Reference table

Post by mc_harsha »

All,

Input:

Table A - Primary link A.key1
Table B - Reference link B.key1

Output:
3 Output Files
- Get all the records which are in both the tables(A.key1=B.key1)
- Records which are there only in table A
- Records which are there only in table B

Is the above output possiable using single look up stage or merge?

Give me your thoughts what would be the design for this?

regards,
Harsha
harshakumar mc
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

Full outer join. This will give you Left.Key1 and right.Key1 fields in the output. Now check to see if there are nulls in these two field. If Left.Key1 is null then this record is present only in Right link. If Right.Key1 is null then this record is present only in Left link. If both are not null then there is matching record in both the links. Andi cannot see a scenario where both can be nulls. :wink:
Post Reply