Page 1 of 1

Using Job Parameter in Column Generator stage

Posted: Thu Aug 28, 2008 2:29 am
by Ragunathan Gunasekaran
Hi ,
I Have to generate an additional date column in the stream of processing .The date column would be acquiring the value from the job parameters.Can this be achieved using modify stage also . Please suggest ... As i dont find any explicit value specification in the modify stage,i hope modify will not help me much ...If that can be achieved in the col generator stage then how can we pass the job parameter into it

Any idea on this please

Re: Using Job Parameter in Column Generator stage

Posted: Thu Aug 28, 2008 2:47 am
by dsdeveloper13
Additional column is not possible with Modify. You can use a transformer to add the column. If performance is an issue, of course other options have to be explored.

Posted: Thu Aug 28, 2008 3:11 am
by Jasti
If you want to do that in the modify stage only you need to have the new date column(DateGenerated) from the preceding stages on the input link.And then you can pass the parameter values to the date column in the specification in a modify stage as:
Secification= #jobparameter#=DateGenerated

If you want to use the column generator stage:
Use Algorith=Cycle,Value= #jobparameter# for the DateGenerated column.

Posted: Thu Aug 28, 2008 3:39 am
by Ragunathan Gunasekaran
Hi ,
The first option of using generated date column in the preceeding stage is not possible as i dont want to use a transformer.
The second option is helpfull.But i require some help on this please .I have used the cycle algorithm ,initial value as the job parameter and the limit as 1 ,so that it cycles back to the initial value for every record.The problem here is that ,whatever date i give in the job parameter its generating this date only 1965-07-01 .Say i have given 2008-08-28 in the run prompt but it generates for 1965-07-01 for the additional column

If i give it as 2018-08-28 ,it adds 10 days to 1965-07-01 and shows that as 1965-07-11. If i give it as 2000-08-28,then it lessens 8 days from 1965-07-01 and shows that as 1965-06-23

Any help on this please
:roll:


Any clue on this please

Posted: Thu Aug 28, 2008 4:33 am
by ray.wurlod
Use a Transformer. There's no reason any more not to.

Unless, of course, you don't have a C++ compiler.

Posted: Thu Aug 28, 2008 5:07 am
by Ragunathan Gunasekaran
Yes Ray , i would be able to use it , but my simple logic to generate the date field fails , i am not sure why its generating this value ....Is there some prediction on this ?

Posted: Thu Aug 28, 2008 5:13 am
by ray.wurlod
The Modify stage does not accept job parameters (I wonder whether Jasti has tested the suggestions made?). This is the fundamental flaw in your "simple logic".

Posted: Thu Aug 28, 2008 5:23 am
by Ragunathan Gunasekaran
Ray , I am Pointing to my col generator option. I have not used the modify stage option. Since i have used the col gen for most of the skeleton designs that i have developed ,i am finding it bit a difficult to change . . . .

Posted: Thu Aug 28, 2008 6:21 am
by Jasti
I'm sorry.

Hi Ray,
I have tested that and my approach is wrong here..Secification= #jobparameter#=DateGenerated is not working.
But Modify stage accepts parameters for specifications and we are using parameters to pass the entire KEEP Specification.