- Double-click the tHMap component to create a new map.
In the tHMap Component
Configuration dialog box that opens, select Generate hierarchical mapper structure based on the schema for the
input structure, and then click Next.
This means that Talend Data Mapper will automatically generate a structure for you, based on the schema of the input component (tRowGenerator in this case).
- For the output structure, select Select an existing hierarchical mapper structure, and then click Next.
- Select the JSON_structure structure that you created earlier, and then click Next and then Finish.
In the Map editor that opens, drag
rowfrom Input (Map) to
personin Output (JSON) to map each of the input elements to its corresponding output element.
- Double-click SimpleLoop in Loop tab and, in the properties box that opens, check Stream Input and then click OK.
- Press Ctrl+S to save your changes to the map.