Search code examples
environment-variablestalend

use environment variables in contextconfig of talend


We want our talend job to use environment variables as parameters. Is it possible to use environment variables in the contextconfig of a talend job?


Solution

  • Several techniques are discussed in this thread https://www.talendforge.org/forum/viewtopic.php?id=8437

    Below is a Java snippet which can be used in most Talend Components (like tJava) to read an environment variable into a context variable

    context.EXAMPLE = System.getProperty("EXAMPLE");