Managing empty element in Map editor - Cloud - 8.0

Talend Studio User Guide

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
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
Design and Development
Last publication date
2024-02-29

About this task

It may be necessary to create and output empty elements during the process of transforming data into XML flow, such as, when tXMLMap works along with tWriteXMLField that creates empty elements or when there is no input column associated with certain XML node in the output XML data flow.

By contrast, in some scenarios, you do not need to output the empty element while you have to keep them in the output XML tree for some reasons.

tXMLMap allows you to set the boolean for the creation of empty element. To do this, on the output side of the Map editor, perform the following operations:

Procedure

  1. Click tMap settings icon to open the map setting panel.
  2. In the panel, click the Create empty element field and from the drop-down list, select true or false to decide whether to output the empty element.
    Create empty element field.
    • If you select true, the empty element is created in the output XML flow and output, for example, <customer><LabelState/></customer>.

    • If you select false, the empty element is not output.