To consolidate records, create a mapping that creates groups of related records. Add a Consolidation transformation to a mapping, and configure the transformation to consolidate each record group into a single master record.
Connect a Consolidation transformation to other transformations according to the business objectives and the data requirements. To consolidate matched records, you can connect the Consolidation transformation to a Match transformation. To consolidate records as part of exception record management, connect the Consolidation transformation to an Exception transformation. If you use a Key Generator transformation to group records, you can connect a Consolidation transformation directly to the Key Generator transformation. The Consolidation transformation creates a consolidated record for each group that the Key Generator transformation creates.
Mapping Output in Native and Hadoop Environments
When you run a consolidation mapping in a native environment and in a Hadoop environment, the Consolidation transformation can generate different results. Because the mapping runs on multiple nodes in Hadoop, the input records can enter the Consolidation transformation in a different order than in the native environment. As a result, the transformation can generate different sets of survivor records in each environment for the same input data set. The transformation calculations and the consolidated results are accurate for the input row order in each case.
To generate the same survivor records in native and Hadoop environments, configure the Consolidation transformation to sort the records in the following order:
First, sort the records on the Group By port.
Then, sort the records in the order in which the input ports appear in the transformation.