Four Stars

Context Variables

I have created around 50 jobs with context environments as Default and dev. But now within the context groups , I had to add the environment - prod and test values, which are different. How can I add these context environments to all 50 jobs at a time without using Implicit load as I am not using file or database for storing contexts, as I don't want to open all the 50 jobs and add manually all the context environments again

3 REPLIES
Fifteen Stars

Re: Context Variables

I cannot advise you strongly enough NOT to use different contexts. I am currently writing a blog post about this. I will post it very soon. Essentially multiple contexts just lead to confusion, more work, more recompilation and just a mess..... even if handled in a "best practice" manner.

The best way to go is via the implicit context load. It gives you complete control WITHOUT having to run the risk of recompiling with value changes, and allows you to forget about which context you are running against if you tie your context to your environment using OS environment variables.

You can also retrospectively set your jobs to use the implicit context load using project settings. Take a look here: https://help.talend.com/reader/mhqCkTBnin7IXmJBUJoocQ/0lPtF5eayDI~33QdLfRY~A
Rilhia Solutions
Six Stars

Re: Context Variables

Looking forward to that post! Can you please also cover ESB in that article?

Fifteen Stars

Re: Context Variables

I wasn't going to spend too much covering the ESB  context variables. This is mainly because I do not use context variables in Talend Routes. However, I do share my context variable names and values with Talend Routes. I use Property Placeholders and followed this tutorial by @eost (http://edwardost.github.io/cloud/platform/soa/2015/05/14/Working-with-Property-Placeholders-in-Talen...) to get my head around them. Take a look, it's pretty useful.

Rilhia Solutions