Page 1 of 1

Env Variables in Transformer

Posted: Wed Oct 31, 2007 10:32 am
by pravin1581
Hi All,

Is it not possible to insert Env variables in the stage variables of Transformer , we are receiving compilation error on doing the same.

Thanks.

Posted: Wed Oct 31, 2007 11:29 am
by dsnovice
You can insert Env variable. $ENV_VARIABLE there are no '#' . there must be some other error, like a missing ':'.

thank you,

Posted: Wed Oct 31, 2007 12:05 pm
by pravin1581
dsnovice wrote:You can insert Env variable. $ENV_VARIABLE there are no '#' . there must be some other error, like a missing ':'.

thank you,
My insertion was absoltely fine, in fact i have inserted it from the ellipsis and then job parameter.

Posted: Wed Oct 31, 2007 12:25 pm
by DSguru2B
Use the transform function GetEnv() I believe. Double check its name, it will be the last transform function category and the only function in that category.

Posted: Wed Oct 31, 2007 12:37 pm
by pravin1581
DSguru2B wrote:Use the transform function GetEnv() I believe. Double check its name, it will be the last transform function category and the only function in that category.
Thanks for the answer, we have tried out that option, but the result is same, no error when we write in the Transformer but we are getting compilation error.

Posted: Wed Oct 31, 2007 1:14 pm
by DSguru2B
Can you post your derivation?
Also, you need to give the environment variable inside GetEnv() and not the job parameter.

Posted: Wed Oct 31, 2007 1:29 pm
by pravin1581
DSguru2B wrote:Can you post your derivation?
Also, you need to give the environment variable inside GetEnv() and not the job parameter.
We are invoking the function GetEnvironment from the Transformer and as the argument to it passing the Env Variable that has been declared in the job prop-parameters tab.We are chhosing the env variables from the ellipsis and then JobParameter.

Thanks.

Posted: Wed Oct 31, 2007 1:43 pm
by DSguru2B
Well, it should work. Thats why it is there. I am not at a px site so cannot check that for you.
If you have the value defined in the job properties, then you can just specify the environment variable. You do not even need to invoke the GetEnvironment() function.

Posted: Wed Oct 31, 2007 1:54 pm
by pravin1581
DSguru2B wrote:Well, it should work. Thats why it is there. I am not at a px site so cannot check that for you.
If you have the value defined in the job properties, then you can just specify the environment variable. You do not even need to invoke the GetEnvironment() function.
Initially I was trying that way, without the function.