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 »

Why is this issue marked as resolved in server forum and then asked again in the parallel forum?

viewtopic.php?t=115678
Havoc
Participant
Posts: 110
Joined: Fri Nov 24, 2006 8:26 am

Re: Rejected records from both Primary and Reference table

Post by Havoc »

mc_harsha wrote: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
Lookup stage, not possible...
Join stage in 'Full Outer Join' mode followed by a filter/transformer..
mc_harsha
Premium Member
Premium Member
Posts: 32
Joined: Mon Mar 06, 2006 5:44 am
Location: bangalore

Post by mc_harsha »

Yup........ :roll:

Can you explain more what you will do in Filter/transformer?


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

Post by Maveric »

Check for nulls in Left.Key1 and Right.Key1. Refer to your previous post in server forum.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

you can also do it by using a CDC of difference stage and the a filter or transformer stage.

in CDC, if it is marked new, it is only available in A.
if marked deleted then only avaiable in B
if marked copy or updated then available in both
Post Reply