Most Recent record from a sequential file

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
Ambuj743
Premium Member
Premium Member
Posts: 8
Joined: Mon Sep 12, 2005 2:44 pm

Most Recent record from a sequential file

Post by Ambuj743 »

I have duplicate data in a sequential file. There is a timestamp field in the sequential file. I want to extract most recent data from the sequential file based on the time stamp.
kcshankar
Charter Member
Charter Member
Posts: 91
Joined: Mon Jan 10, 2005 2:06 am

Post by kcshankar »

Hi,
There are many ways.
One of them is by using SecondsSinceFromTimestamp
Try to get minimun(Timestamp difference between given date and sysdate).

regards
kcs
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Use Sort stage.
Use two key in Sort stage, 1. Some unique field or ID, 2. Timestamp (Descending).
Retain first.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply