When you add incoming struct and array fields to the output, you can preserve the incoming field. When you preserve the incoming field, it's copied to hierarchical output without changing the structure.
When you add a nested array and select "Preserve incoming fields", the data source configuration for the output group determines how the records are created.
Example of preserving incoming fields
You want to extract the description information from a nested array of maintenance records. The description information is in an array of strings. You want the output data to also be in an array of strings.
Add the description array to the output group and choose
Preserve Incoming Field
.
The following image shows the incoming and output fields:
When
Data Integration
creates the output array, it sets the data source for the description array to
, indicating that the information for the output array comes from the elements in the desc array in the Input group. The data source for the Output group determines the structure of the output records.
By default,
Data Integration
sets the data source for the Output group to
Input
. When you run the mapping,
Data Integration
collates all descriptions into one output record. To write the descriptions to separate records for each vehicle, set the data source to
Input.vehicle.vehicle
. To write the descriptions to separate records for each maintenance record, set the data source to