Working on Group of records

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
vinodnr
Premium Member
Premium Member
Posts: 4
Joined: Wed Oct 01, 2014 1:09 pm

Working on Group of records

Post by vinodnr »

Hi,
Is there any way we can find Max date and Min date if records are continius and other records in a group need to be passed to target if not continious.

Source File:
Key4|2011-01-01|2011-12-31
Key1|2013-01-01|2013-12-31
Key2|2010-01-01|2012-05-25
Key3|2010-01-01|2010-12-31
Key4|2010-01-01|2010-12-31
Key1|2009-01-01|2010-12-31
Key3|2011-01-01|2012-12-31
Key2|2014-01-01|2018-12-31
Key1|2014-01-01|2020-12-31
Key2|2011-01-01|2013-12-31
Key4|2012-01-01|2013-05-25
Key3|2012-01-01|2013-05-25
Key4|2012-01-01|2018-12-31
Key2|2025-01-01|2026-05-25
Key3|2012-01-01|2018-12-31


Target File:
Key1|2009-01-01|2010-12-31
Key1|2013-01-01|2020-12-31
Key2|2010-01-01|2018-12-31
Key2|2025-01-01|2026-05-25
Key3|2010-01-01|2018-12-31
Key4|2010-01-01|2018-12-31

Regards,

Vinod
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

Use Sort and Aggregator stages if you want to do this in DataStage.

Use Transformer stage to detect discontinuities and direct the flow of data appropriately to your needs.
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