Configuring the tXMLMap component - 7.3

ESB REST

Version
7.3
Language
English
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 Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > ESB components > ESB REST components
Data Quality and Preparation > Third-party systems > ESB components > ESB REST components
Design and Development > Third-party systems > ESB components > ESB REST components
Last publication date
2024-02-21

Procedure

  1. Right-click tMysqlInput, hold and drag to tXMLMap to connect the two components together.
  2. Double-click tXMLMap in the design workspace to open the Map Editor.
  3. Click the [+] button on the top right to add an output and name it as ResponseUsers.
  4. Click the [+] button on the bottom right to add two columns for the output.
    Name the first column as body and set the Type to Document.
    Name the second column as string and set the Type to String.
  5. Right-click on the root node, select Rename in the list and rename it users
  6. Right-click on the users node and select Create Sub-Element to create a sub-element. Name the sub-element user in the popup dialog box.
  7. Right-click on the user node created in the previous step and select As loop element.
  8. Select the id column of the row2 table to the left and drop it onto the user node of the ResponseUsers table to the right.
  9. In the Selection dialog box, select the Create as attribute of target node option and click OK.
  10. Select the firstname and lastname columns of the row2 table to the left and drop it onto the user node of the ResponseUsers table to the right.
  11. In the Selection dialog box, select the Create as sub-element of target node option and click OK.
  12. Click the wrench icon on the top of the ResponseUsers table to open the setting panel.
  13. Set the All in one feature as true, this way all XML data is outputted in one single flow.
  14. Click OK to save the settings.