Current Time from Column Generator

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
sidharth
Participant
Posts: 19
Joined: Mon Nov 07, 2005 1:47 am

Current Time from Column Generator

Post by sidharth »

Hi All,
I have a requirement where i need to update a field(LAST_UPDATE_TIME) in a table with the current timestamp, when a record gets updated. I can very well use a parallel transformer and use a CurrentTimestamp() function. But wanted to check if we can use any other stage to get this requirement done. Basically i am trying to avoid the usage of a transformer.
Is there a way we can generate a current timestamp (like sysdate) using a "Column Generator/Row Generator" Stage ? if yes, can you please let me know the parameters ? When i tried it gives the default date (1960-01-01). I am using a sequential file as source.

Thanks for the clarification.

-Sid
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Using the generation attributes will let you either cycle through a list of values or increment from a starting epoch, but won't give you the current date/time. You should use the transform stage for that derivation.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The Column Generator stage has the limitations that Arnd suggests. You need a different stage type downstream (probably a Transformer stage) to insert the current time value.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
goosarikiran
Participant
Posts: 9
Joined: Tue Jul 26, 2005 11:12 pm
Location: Bangalore

Re: Current Time from Column Generator

Post by goosarikiran »

Hi

it is not possible to assign the current timestamp in the column generator stage. But you can pass the hard coded time stamp (calling any routine and assigning the value to the parameter) using job parameter to the column generator stage. This may help you....


Kiran
Regards,

Kiran
Post Reply