August 16, 2023

Creating a context variable – Docs for ESB 6.x

Creating a context variable

To be able to choose a database connection dynamically at runtime, we need to
define a context variable, which will then be configure it in the Dynamic settings of the database input component.

  1. In the Contexts view, click the [+] button to add a row in the table, click in
    the Name field and enter a name for the
    variable, myConnection in this
    example.

    use_case-tmysqlinput-dynamic_connection-context1.png

  2. From the Type list field, select
    List Of Value.
  3. Click in the Value field and then click
    the button that appears in the field to open the [Configure value of list] dialog box.

    use_case-tmysqlinput-dynamic_connection-context2.png

  4. In the [Configure value of list] dialog
    box, click the New… button to open the
    [New Value] dialog box, and enter the
    name of one of the connection components in the text field, tMysqlConnection_1 in this example. Then click
    OK to close the dialog box.

    use_case-tmysqlinput-dynamic_connection-context3.png

    Repeat this step to specify the other connection component name as another
    list item, tMysqlConnection_2 in this
    example.
    When done, click OK to close the
    [Configure Values] dialog box.
  5. Select the check box next to the variable value field, and fill the
    Prompt field with the message you want
    to display at runtime, Select a connection
    component:
    in this example.

Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x