About this task
The quickest way to create a single context variable is to use the
F5 key from the Component view. The following example demonstrates how to create a
context variable while configuring a file path for a component in a Job.
Procedure
-
On the relevant Component
view, place your cursor in the field you want to parameterize.
-
Press F5 to display the
New Context Parameter dialog box:
-
Give a Name to this new
variable, fill in the Comment field if needed,
and choose the Type.
Note: The variable name should
follow some typing rules and should not contain any forbidden characters, such as
space character.
-
If you have not installed the 8.0 R2023-09 Studio monthly update or a later one
provided by Talend, enter a Prompt to be displayed to confirm the use of
this variable in the current Job execution (generally used for test purpose
only), select the Prompt for value check box to display
the prompt message and an editable value field at the execution time.
-
If you filled in a value already in the corresponding properties
field, this value is displayed in the Default
value field. Else, type in the default value you want to use for one
context.
-
Click Finish to validate.
-
Go to the Context view tab. Notice that the context
variables tab lists the newly created variables.
Results
The newly created variables are listed in the Context view. The
variable created this way is automatically stored in all existing context
environments, but you can subsequently change the value independently in each
context environment. For more information on how to create or edit a context
environment, see Defining context environments.