Null Value Support - 6.3

Talend Data Mapper User Guide

EnrichVersion
6.3
EnrichProdName
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend Studio

Certain representations support the notion of a null value, which is a special value indicating the explicit absence of data. These representations are XML, Java and Database.

  • XML - A null value in XML is represented as the presence of the xsi:nil attribute being true. For example: xsi:nil = "true".

  • Java - A null value in Java is represented by the field or property of the object having a null value.

  • Database - A null value in the Database is represented by using the SQL null value for the column in the row.

Null values are enabled for a particular element by setting the Null Property on the element. This is done automatically during the import process for the representations that support null values.

Null values are passed through the mapping transparently. So if you map a value from a Java field element to an XML element and they both support the Null property, the correct null value will appear in the output. You can explicitly specify a null value using the Constant function and you can test for null using the IsNull function.

There are also cases when you want container elements to be emitted as null, in this case you can use the Null Expression to control this. The Null expression is also automatically generated.