Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
radhikari
Contributor III
Contributor III

set context variables based on environment

Since I am a Talend newbie, my apologies if this has been address already.

 

So, we have created a couple of content groups to store context variables for database connection, file path, etc.

 

Now, when we deploy and run these jobs to various environments (DEV, TEST, PROD), how do the jobs which which environment it's running on? Do we need to define DEV, TEST, PROD using some sort of environment variable in each environment?

 

Thanks.

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

You select the right context when you create the task in TAC.  It is the context option when you create a task in TAC. The context will list DEV, TEST, PROD as per what you have specified in the Studio when defining your context groups.  Selecting the context means the job will be executed with the default values you specified in the studio for that context.  You can still override specific context variables in the TAC.

View solution in original post

5 Replies
TRF
Champion II
Champion II

Look at the script file you used to lauch the job, it contains something like "--context=default" (not sure how it is exactly but this is the idea).
So, you can change the command line with the context you want to use or just copy the XXX.properties file (here again, check the filename) to default.properties file (replace XXX by the context name you want to use).
You got it?
radhikari
Contributor III
Contributor III
Author

I get the gist, but I am not sure what script file you are referring to. I launch the jobs using TAC - so, is there a config file in TAC that I can update?

TRF
Champion II
Champion II

I was speaking about Community version. Using TAC, as I remember, you select the context to use when you create the task or maybe when you deploy the job. Sorry, can't try be myself as I don't have access to the Enterprise version at the moment.
Anonymous
Not applicable

You select the right context when you create the task in TAC.  It is the context option when you create a task in TAC. The context will list DEV, TEST, PROD as per what you have specified in the Studio when defining your context groups.  Selecting the context means the job will be executed with the default values you specified in the studio for that context.  You can still override specific context variables in the TAC.

Anonymous
Not applicable

How do you override the individual context variables from within the TAC?  I see where you set the context (DEV/TEST/etc) in the Job Conductor, but how do you set the actual variables?