For your Job to be usable in differents situations, you will create two distincts
contexts.
Talend Studio allows you to create a set of
variables that you can regroup in a context. In this example, you will create a context
called Development and another one called
Production. Each of these contexts will contain the variables to
be used for the tDataprepRun configuration, according to the
target environment.
Procedure
-
Click the Contexts tab of your
Job.
-
Click the + button on the top right of the variables
table to create a new context.
-
Select the Default context and click
Edit... to rename it
Development.
-
Click New... to create a new context called
Production.
-
Click the + button on the bottom left of the variables
table to create a new variable called
parameter_URL.
The parameter_
prefix is mandatory, in order for the
variable to be retrievable in Talend Cloud Management Console, if you use the Cloud
version of Talend Data Preparation.
-
On the newly created URL line, enter the URLs of your
development and production instances of Talend Data Preparation in the corresponding
columns.
-
Repeat the last two steps in order to create the
parameter_USERNAME and
parameter_PASSWORD variables, that will store your
Talend Data Preparation credentials depending
on the environment.
If Multi Factor Authentication is activated, use your authentication token
instead of your password when creating the
parameter_PASSWORD variable.
Results
These two different contexts will be available at execution time, when deploying your
Job.