Defining context variables - Cloud - 8.0

Talend Studio User Guide

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Design and Development
Last publication date
2024-02-29

Procedure

  1. Click the [+] button to add a parameter line in the table.
  2. Click in the Name field and enter the name of the variable you are creating, host in this example.
  3. From the Type list, select the type of the variable corresponding to the component field where it will be used, String for the variable host in this example.
    Warning: If you change the type of a variable that has already a value, the value will be cleared and you need to set it again.
  4. If needed, click in the Comment field and enter a comment to describe the variable.
  5. Click in the value field for each context environment and enter the variable value.
    For different variable types, the value field appears slightly different when you click in it and functions differently:
    Type Value field
    String (default type) Editable text field
    Boolean Drop-down list box with two options: true and false
    Character, Double, Integer, Long, Short, Object, BigDecimal Editable text field
    Date Editable text field, with a button to open the Select Date & Time dialog box.
    File Editable text field, with a button to open the Open dialog box for file selection.
    Directory Editable text field, with a button to open the Browse for Folder dialog box for folder selection.
    List of Value Editable text field, with a button to open the Configure Values dialog box for list creation and configuration.
    Password Editable text field; text entered appears encrypted.
    Resource Editable text field, with a button to open the Select a Resource dialog box for you to select a resource defined under Resources in the Repository.

    For more information, see Using resources in Jobs.

  6. Optional: If you want to see a prompt for the variable value and to edit it when running your Job or Route in a context environment,
    • For R2023-09 onwards: select the Enable prompt check box. This check box is applied globally to all context environments and the context variable name is used as the prompt label.
    • For R2023-08 backwards: select the Enable prompt check box for the corresponding context environment and enter the prompt label in the field next to the check box.
  7. Repeat the steps above to define all the variables in this example.
    • port, type String,
    • database, type String,
    • username, type String,
    • password, type Password,
    • table, type String
    Create / Edit context wizard.
    All the variables created and their values under different context environments are displayed in the table and are ready for use in your Job.
    You can further edit the variables if needed. Through preference configuration, you can enable or disable propagation of variable changes to your Jobs. For more information, see Performance preferences (Talend > Performance).