Page 1 of 1

passing parameters in between stages of a sequence

Posted: Mon Aug 28, 2006 2:40 am
by stivazzi
Good morning. i have a server job, writing to oracle tables.
if a record is rejected, i send mail using DSSendMailTester(), and set the error variable in the userStatus with setUserStatus()...
in the sequence job, i get the userStatus and pass it to a new server job, because i want to get the userStatus's value and write log to the db...
now the situation is: new job, with a variable with errorLog value... how can i get that variable and write it to db?

thanks a lot

Posted: Mon Aug 28, 2006 2:58 am
by kumar_s
That variable will be passed as an Parameter to the next job. You can make you of the parameter in transformer stage or even in you DB stage to write in to table.

Posted: Mon Aug 28, 2006 2:59 am
by loveojha2
Put in the transformer's derivation (as a job parameter) for the column of the db where you want it finally. That's all about it.

Posted: Mon Aug 28, 2006 3:11 am
by stivazzi
ok... that was what i thought... but... the new server job... can not have just transformer and oci stage...
should have something before transformer.... what?

Posted: Mon Aug 28, 2006 3:28 am
by loveojha2
Even it can be without having any source, just need to put one stage variable and a constraint to the output link so that it runs atleast once.

Try it.

Posted: Mon Aug 28, 2006 3:30 am
by ArndW
It is possible to have a job which has a transform stage as the source. You need to define at least one stage variable and also put a constraint on the output so that the job finishes. But this is exactly what you are trying to do - write just one record to your database with the value of the parameter.

Posted: Mon Aug 28, 2006 10:28 pm
by kumar_s
The simple solution as been shared. If you are not comfortable, you can aslo have another DS stage with user defined query as "SELECT #PARAMETER# from DUAL"; and pass this value to the consecutive DB stage.

Posted: Tue Aug 29, 2006 1:08 am
by ray.wurlod
Using a User Variables activity upstream of these other activities is an erudite manner in which to expose the values to those other activities in a consistent and easily-maintained way.