Managing empty element in Map editor - 7.3

Talend Open Studio User Guide

Version
7.3
Language
English
Product
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Module
Talend Studio
Content
Design and Development
Last publication date
2023-10-11
Available in...

Open Studio for Big Data

Open Studio for Data Integration

Open Studio for ESB

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 the pincer 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.
    • 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.