One Star

Context VAriable for TAC jobs

Hi,
  We have deployed some jobs in TAC, and we are going to run that directly from TAC (using Run Option), so while deploying we need to pass the context variable to TAC from Linux Environment. How can we achieve that... even running from Linux also fine for us.
Thanks,
Abi
6 REPLIES
Community Manager

Re: Context VAriable for TAC jobs

Hi
You can specify new value to context variable in the job conductor page, there is a context tab under the task list.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Context VAriable for TAC jobs

hi Shong,
  I have many jobs like Test1, Test 2,... Test 30. All the using context variable called Properties. I want to give value for properties (which is my main context file which contains all other variables ) from a unix variable. Because that value will be changing from environment to environment. Instaed of hard coding that value in ob conductor is there a way from unix side to update the variable. So that we can give that command/Script to higher enviroments to update that properties file
One Star

Re: Context VAriable for TAC jobs

hi,
 I tried using context.properties=System.getenv("DMPATH"); but that is not returning anything.
Community Manager

Re: Context VAriable for TAC jobs

refer to this topic, you should get the system env variable with Java code in the beginning of job.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Context VAriable for TAC jobs

hi Shong,
  I ahve already referred that tpic and tried in my job it is not working, it is returning me null PFA job screen shot and also environemt variable assigned in bash_profile.

To be clear this is my main property file, which has all other context variabl values. I want to pass this value as dynamic.
Community Manager

Re: Context VAriable for TAC jobs

try this 
System.getenv("DM_CNTXT_TLND")
----------------------------------------------------------
Talend | Data Agility for Modern Business