Page 1 of 1

calling environmental varible in transformer stage

Posted: Tue Jan 25, 2011 4:54 am
by vinsashi
Hi,
I declared one user defined environmetal varible "rec_flag" in administrator.I called that one job parameters in job.and in transformer stage for one column i called that job parameter(derivation is like this:$rec_flag).When compiling it showing error.

Thanks
V................

Posted: Tue Jan 25, 2011 5:34 am
by nayanpatra
The derivation should not start with $ for job parameters in a transformer stage

Posted: Tue Jan 25, 2011 5:45 am
by vinsashi
if we call that jobparameter we will get like that only........

Posted: Tue Jan 25, 2011 8:45 am
by DSguru2B
Use GetEnvironment() to retrieve an environment variable value.

Posted: Tue Jan 25, 2011 7:41 pm
by jwiles
Use GetEnvironment() to retrieve an environment variable value.
And do this as the initial value derivation for a stage variable and then reference the stage variable in the output column. You DON'T want to call GetEnvironment() in an output column derivation...not a good practice.

Posted: Tue Jan 25, 2011 7:44 pm
by jwiles
nayanpatra wrote:The derivation should not start with $ for job parameters in a transformer stage
As an FYI...this has changed with 8x. You can now directly use $-named job parms in a transformer.

Regards,

Posted: Tue Jan 25, 2011 8:40 pm
by ray.wurlod
... only if they're in the job as parameters.

GetEnvironment() can reference any environment variable available to the process.