When you configure the data source for an array or struct field, you can populate the children of the field either with the incoming data or by inheriting the parent's data sources.
When you use the incoming data, the incoming data is used to populate the children of the array or struct.
When you inherit the parent's data sources, the data transformed into the parent output field populates the children of the array or struct. This preserves the data transformations (for example, joins and filters), in the parent fields. You can apply filters to the field to further filter the data, but you can't configure data sources, joins, group by fields, or order by fields.
For example, you are reading data from a relational table of customer records in which the customer ID is unique. The incoming data contains the following records:
You want to write the customer address fields to a struct.
The following image shows the incoming and output fields:
In the Output Fields panel, set the data source for the Output group to
Input
and the data source for the Address struct to
Inherit parent's data sources (Output)
. When you run the mapping, the Hierarchy Processor transformation creates one record for each occurrence of CustID in the input data and populates the struct with the address data that corresponds to the customer ID in the output: