Environment variable in column derivation of the transformer

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Environment variable in column derivation of the transformer

Post 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.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

-craig

"You can never have too many knives" -- Logan Nine Fingers
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post 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.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

No clue, I'll have to let someone who actually uses 8 answer that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
deanwalker
Participant
Posts: 82
Joined: Tue Jan 22, 2008 10:37 am
Location: UK

Post by deanwalker »

Same answer:
You can't use an environment variable 'there'.
The workaround is to use GetEnvironment("envvarname")
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post 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.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post 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.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post 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.
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
OddJob
Participant
Posts: 163
Joined: Tue Feb 28, 2006 5:00 am
Location: Sheffield, UK

Post by OddJob »

It's not a workaround, it's what you need to do to get environment variable values into your transformers!
deanwalker
Participant
Posts: 82
Joined: Tue Jan 22, 2008 10:37 am
Location: UK

Post 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.
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

Post 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.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
Post Reply