Grouping calculations are applied to the target of a data transfer action, to eliminate duplicates during the data transfer before they are inserted or Select Updated into the target data source. For example a source product file may have duplicates of particular products that you do not wish to duplicate in the target data source, or you might use Grouping calculations to ensure an appropriate structure in the target data source, for example in our Example JDBC mapping. A grouping calculation describes the target fields that as a group specify a unique target entity. In the case of a product for example, this might be a product number. As the data transfer proceeds, any subsequent records that are duplicates of the first one are ignored. Thus you determine in grouping calculations, which field in a target entity makes this entity unique. By grouping this target field and target entity, the mapping will create a new target entity only when the target field is different. For example we might group an order header with order number, and in this case the mapping creates a new target header for each different order number.
To create a grouping calculation simply drag and drop on the Mapping window. Dragging a target field to a target entity in the right hand target pane creates the grouping calculation, automatically entering the corresponding calculation in the box at the bottom of the screen. For example see Example JDBC mapping, where a grouping calculation for the OrderHeader entity of the target data source for example, specifies that the OrderID field makes this entity unique during a transfer. You can also create group calculations by dragging a source field onto a target entity. You will do this for example when you have a source field that is a unique system key that you want to use to group the target entity, but you don't actually want to map that field to your target. This allows you to correctly remove duplicates, but without actually including that field in your target data source.
Note that generated unique keys which may be specified in the case of JDBC data sources may not be used in group calculations.
Related topics include Data transfers overview, Mapping, Example JDBC mapping, Calculator overview