How do I remove the old timestamp values at the target leve?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
venkycool
Participant
Posts: 59
Joined: Fri Feb 16, 2007 12:24 am
Location: USA

How do I remove the old timestamp values at the target leve?

Post by venkycool »

Hello,

Please let me know how to remove the record which is having the old timestamp value.

For eg: ETLTimestamp column is set as DSJobstartTimeStamp in transformer.

In the target, when i view the data its showing previous dates in few columns and rest all showing the correct timestamp value. But, I need to remove those or i dont want to get the records which are having old dates as in TimeStamp.

It should show today date in all the records for all the column...

The old date which are showing should be ignored or removed.

My job design is DRS---Tranformer---DRS.

Please help!! Thanks in advance!!


Venky
Suriv
No one is perfect... that's why pencils have erasers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Put a WHERE clause in your SELECT statement. Pass the date as a job parameter. Use a reference to that parameter in the WHERE clause, for example

Code: Select all

EFFECTIVE_DATE >= '#CutoffDate#'
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
venkycool
Participant
Posts: 59
Joined: Fri Feb 16, 2007 12:24 am
Location: USA

Post by venkycool »

Ray, thanks for your time and could you be more specific on the where clause?? I just want to write some transformation logic in the transformer so that all the fileds can show the curent timestamp and old timestamp needs to remove...

Thanks
Suriv
No one is perfect... that's why pencils have erasers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The WHERE clause in the SELECT statement is more efficient, as you end up processing fewer rows and therefore finish faster. If you insist upon filtering within a Transformer stage, then the proper location is within the constraint expression for the output link. The logic is identical.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Post by major »

Hi,

You can use DateCurrentDateTime("1") function to get the current time and eliminate previous records using above
jayednewman
Participant
Posts: 9
Joined: Fri May 26, 2006 9:23 am
Location: KCMO

Post by jayednewman »

As an alternative (but probably not a preferred one), you can always use Rank in your select statement and get everything where Rank > 1
"Go Hogs!"
Post Reply