XML Map Grouping Methods

The XML Map transform groups output items in different ways depending upon the columns specified and whether or not aggregation functions are used.

Grouping method

Description

Simple grouping

The XML Map transform groups output items together according to the unique values of the grouping list when the following conditions are met:

  • Source or target columns are specified in the grouping list

  • If source columns are specified, no aggregation functions are defined in the selected target schema

In this grouping method, no items are removed from the output data set.

Group aggregation

The XML Map transform performs exactly like a standard SQL GROUP BY clause when the following conditions are met:

  • Source columns are specified in the grouping list

  • Aggregation functions are defined in the selected target schema

  • Columns in the aggregation functions descend from the sources in the current iteration rule

  • Paths from the iterating sources to the columns do not contain any repeatable nodes

Note
All columns in the output schema must be either part of the grouping list or mapped to an aggregate function such as avg, count, max, min, or sum.

Instance aggregation

The XML Map transform evaluated the aggregation functions for each of the items in the output data set when the following conditions are met:

  • Aggregation functions are defined under the selected target schema

  • Columns used in the aggregation functions descend from the sources in the current iteration rule

  • Paths from the sources to the columns being used contain repeatable nodes

The XML Map transform also evaluates the aggregation functions for each of the items in the output data set when the following conditions are met:
  • Aggregation functions are defined under the selected target schema

  • Columns used in the aggregation functions descend from the selected target schema

  • Paths from the selected target schema to the columns being used contain repeatable nodes

Restriction
You cannot use both group and instance aggregation at the same time.