Extracting the delimited string column in the database table into multiple columns - 7.1

Processing (Integration)

Version
7.1
Language
English (United States)
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > Processing components (Integration)
Data Quality and Preparation > Third-party systems > Processing components (Integration)
Design and Development > Third-party systems > Processing components (Integration)

Procedure

  1. Double-click tMysqlInput to open its Basic settings view.
  2. Fill the Host, Port, Database, Username, Password fields with the MySQL database connection information.
  3. Click the [...] button next to Edit schema and in the pop-up window define the schema of the tMysqlInput component same as the schema of the tMysqlOutput component.
  4. In the Table Name field, enter the name of the table into which the data was written. In this example, it is employee.
  5. Click the Guess Query button to fill the Query field with the SQL query statement to be executed on the specified table. In this example, it is as follows:
    SELECT 
      `employee`.`Id`, 
      `employee`.`Name`, 
      `employee`.`DelimitedField`
    FROM `employee`
  6. Double-click tExtractDelimitedFields to open its Basic settings view.
  7. In the Field to split list, select the delimited string column to be extracted. In this example, it is DelimitedField.
    In the Field separator, enter the separator used to separate the fields in the delimited string column. In this example, it is ,.
  8. Click the [...] button next to Edit schema and in the pop-up window define the schema by adding five columns: Id of Integer type, and Name, Age, Team, Title of String type.
    In this example, the delimited string column DelimitedField is split into three columns Age, Team and Title, and the Id and Name columns are kept as well.
    Click OK to close the schema editor and accept the propagation prompted by the pop-up dialog box.
  9. Double-click the second tLogRow to open its Basic settings view.
    In the Mode area, select Table (print values in cells of a table) for better readability of the result.