Configuring the components

Defining Context Groups

author
Talend Documentation Team
EnrichVersion
6.5
EnrichProdName
Talend Big Data Platform
Talend Open Studio for ESB
Talend Big Data
Talend ESB
Talend Data Services Platform
Talend Data Integration
Talend Data Fabric
Talend Open Studio for MDM
Talend Data Management Platform
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Real-Time Big Data Platform
task
Design and Development > Defining Context Groups
EnrichPlatform
Talend Studio

Procedure

  1. Double-click the first tMysqlConnection component to show its Basic settings view, and set the connection details. For more information on the configuration of tMysqlConnection, see tMysqlConnection.
    Note that we use this component to open a connection to a MySQL databased named project_q1.
  2. Configure the second tMysqlConnection component in the same way, but fill the Database field with project_q2 because we want to use this component to open a connection to another MySQL database, project_q2.
  3. Double-click the tMysqlInput component to show its Basic settings view.
  4. Select the Use an existing connection check box, and leave the Component List box as it is.
  5. Click the [...] button next to Edit schema to open the [Schema] dialog box and define the data structure of the database table to read data from.
    In this example, the database table structure is made of four columns, id (type Integer, 2 characters long), firstName (type String, 15 characters long), lastName (type String, 15 characters long), and city (type String, 15 characters long). When done, click OK to close the dialog box and propagate the schema settings to the next component.
  6. Fill the Table field with the database table name, customers in this example, and click Guess Query to generate the query statement corresponding to your table schema in the Query field.
  7. In the Dynamic settings view, click the [+] button to add a row in the table, and fill the Code field with the code script of the context variable you just created, " + context.myConnection + " in this example.
  8. In the Basic settings view of the tLogRow component, select the Table option for better display effect of the Job execution result.
  9. In the Dynamic settings view of the tMysqlClose component, do exactly the same as in the Dynamic settings view of the tMysqlInput component.