Page 1 of 1

Environment variable in column derivation of the transformer

Posted: Tue May 27, 2008 11:59 am
by I_Server_Whale
Hi all,

I'm trying to use an Environment variable (project level params) in the column derivation of the transformer and the job wont compile. Anybody encountered this?

Regards,
Whale.

Posted: Tue May 27, 2008 12:21 pm
by chulett

Posted: Tue May 27, 2008 12:53 pm
by I_Server_Whale
Thanks Craig!!

Isn't it supposed to work in the transformer derivation? Was this the same behavior in 7.x as well or just a bug in 8.x?

Regards,
Whale.

Posted: Tue May 27, 2008 1:08 pm
by chulett
No clue, I'll have to let someone who actually uses 8 answer that.

Posted: Tue May 27, 2008 1:47 pm
by deanwalker
Same answer:
You can't use an environment variable 'there'.
The workaround is to use GetEnvironment("envvarname")

Posted: Tue May 27, 2008 1:48 pm
by I_Server_Whale
Craig,

I'm using 8.x and it blows up in 8.x. If you are on 7.x, can you confirm if it blows up on 7.x as well?

Regards,
Whale.

Posted: Tue May 27, 2008 2:36 pm
by I_Server_Whale
deanwalker wrote:Same answer:
You can't use an environment variable 'there'.
The workaround is to use GetEnvironment("envvarname")
Hi Dean,

Thank you. But, I'm not looking for a workaround. I just want to know if this is a bug in 8.x.

Regards,
Whale.

Posted: Tue May 27, 2008 8:30 pm
by Minhajuddin
I just tried it with DS 7.5x2, And it doesn't compile. In the compiler error, it complains about the "$" sign in the environment variable.

Posted: Wed May 28, 2008 2:40 am
by OddJob
It's not a workaround, it's what you need to do to get environment variable values into your transformers!

Posted: Wed May 28, 2008 3:10 am
by deanwalker
I think a 'workaround' is what you do to get a process to work while reporting the bug to support and waiting for a fix.
Several times in the past I have had to protect calls to APIs that were not checking for bad arguments, whilst also reporting the API crashes to the vendor.

Posted: Wed May 28, 2008 12:14 pm
by I_Server_Whale
deanwalker wrote:I think a 'workaround' is what you do to get a process to work while reporting the bug to support and waiting for a fix.
Several times in the past I have had to protect calls to APIs that were not checking for bad arguments, whilst also reporting the API crashes to the vendor.
Totally concur with the definition of a 'workaround' :) I was curious to know if it behaved the same in 7.x and 8.x.

Thanks a bunch for all your valuable inputs!

Regards,
Whale.