Page 1 of 1

Find unique records based on another field

Posted: Mon Dec 31, 2012 12:34 am
by skp
Hi All,

My requirement is
Emp No, Emp Name
12345, skp
14567, skp
43567, skp
56789, skp
45678, rjp
23456, skp
45236, mkp

Group by Emp Name I have to find out if more than one employee is there I need to pass to target else I have to reject and capture the records.

Target O/P
12345, skp
14567, skp
43567, skp
56789, skp
23456, skp

Reject O/P
45678, rjp
45236, mkp

In datastage how we can achieve this... Appreciate your help...

Thanks,
skp.

Posted: Mon Dec 31, 2012 1:26 am
by ray.wurlod
This is a classic "fork join" job design. Search DSXchange for examples of how it's done. Basically, though, you use a Copy stage to make two copies of your data. Apply an Aggregator to perform the counts and run the two inputs into a Join stage. Downstream of that, filter out those groups that have a count of more than one into your "reject" handler. Actually, you don't need the Join stage to solve your particular problem.

Posted: Mon Dec 31, 2012 2:40 am
by skp
Not able to view entire post.. any one please help on this...

Posted: Mon Dec 31, 2012 8:55 am
by chulett
ray.wurlod wrote:This is a classic "fork join" job design. Search DSXchange for examples of how it's done.
You can certainly see enough of the post.

Posted: Thu Jan 03, 2013 1:33 pm
by srinivas.nettalam

Code: Select all

fork join:
                |-----------Aggr----> |
                |                     |
Source-->Copy---|------------------>Join ------>Target