Handling types of Object - 7.3

Talend Data Mapper User Guide

Version
7.3
Language
English
Product
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Design and Development > Designing Jobs
Last publication date
2023-01-05

Only primitive values (like numbers, dates and strings) can be directly manipulated and mapped to elements using Talend Data Mapper. This is because it needs uniformly support mapping data to or from any source. Because of this there is no notion of mapping the entire contents of a Java object directly. That is to say, if you are doing a Java to Java mapping, and you have a property that's a type Object on the input, you cannot map the object that is contained in that property to some property on the output, because objects cannot be directly manipulated.

This is rarely an issue because you would typically define your property as a type more specific than Object and then use the subclass handling mechanisms to determine which type is to be emitted in the output, and then populate that type with the desired values.

If a property or field is encountered with a type of Object, the generated element in the structure will have a group type of Sequence to prevent the element from being mapped.