Reqire logical assistance

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
creatingfusion
Participant
Posts: 46
Joined: Tue Jul 20, 2010 1:26 pm
Location: USA
Contact:

Reqire logical assistance

Post by creatingfusion »

Requirement:

The input data looks somethin like -
Col_A|Col_B|Col_C|Col_Date1|Col_Date2
A|B|C|2001/01/01|2002/01/03
A|B|C|2001/01/02|2002/01/04
A|B|C|2001/01/03|2002/01/05

The output should be:
Col_A|Col_B|Col_C|Col_Date1|Col_Date2
A|B|C|2001/01/01|2002/01/05

Requirement: if Col_A, Col_B and Col_C are same amongst the input columns then the output should be only one row with Col_A, Col_B and Col_C and pick up the earliesrt date of Col_Date1 and recent date of Col_Date2

Please provide yours solutions how this can ba implemented using datastage.

Regards
Abhijit
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not sure why you felt the need to hijack a completely unrelated thread for this question, regardless here we are all split out on your lonesome. Please take more care next time. Also note that I've had to guess at your particulars regarding version, O/S etc... if any are wrong please edit your post and correct them.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Looks to me like Aggregation, grouping on the first three columns and then min/max on the other two.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Looks to me also like Aggregation, grouping on the first three columns and then min/max on the other two.

Don't forget to get your partitioning (and sorting, if you need it) correct.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply