Configuring the tXMLMap component

ESB REST

author
Talend Documentation Team
EnrichVersion
6.4
EnrichProdName
Talend Big Data
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Data Management Platform
Talend Real-Time Big Data Platform
Talend Data Integration
Talend ESB
Talend Open Studio for ESB
Talend Data Fabric
Talend MDM Platform
Talend Open Studio for MDM
Talend Big Data Platform
Talend Data Services Platform
task
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
EnrichPlatform
Talend Studio

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.