Page 1 of 1

Current Time from Column Generator

Posted: Wed Oct 04, 2006 1:35 am
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

Posted: Wed Oct 04, 2006 3:08 am
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.

Posted: Wed Oct 04, 2006 2:06 pm
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.

Re: Current Time from Column Generator

Posted: Thu Oct 05, 2006 11:38 pm
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