Group Hierarchical Data into Blocks

Use the XML Batch transform to group flat or hierarchical data sets into blocks before sending the result to the next transform. For example, to improve web service performance, you might want to send a data set to the web service target using groups of multiple rows per call instead of a single row per call.
Tip

When working with flat data sets, consider using the GROUP BY capabilities of another transform. While XML Batch can process flat data sets, the output is always hierarchical.

When you use the XML Batch transform, you cannot manually create mappings between the input and output schemas. XML Batch supports a single input schema parent that is mapped as a child of the top level of the output schema. Use the options available in the Details tab to configure the transform.

XML Batch options

Option

Description

Batch Size

Specifies the maximum size of rows for each batch. The value can be a positive integer or global variable.

Default batch size: 10,000

Batch key columns

Optional. Specifies the input columns on which a given batch is constructed. When a column is selected, the column value is used to group rows into the batch. For each batch, rows are grouped up to the maximum batch size. Any additional rows are added to the next batch.

To add a batch key column, drag only the first level key in the input schema to the batch key column field in the Details tab.

When a batch key column is selected, the Input already sorted by batch key columns option is available. Selecting this option improves performance for data that has already been sorted by value in the selected column, and does not require additional sorting.

Caution
Select Input already sorted by batch key columns only when you are certain that the data is sorted. If there is unsorted data, the generated batches will be incorrect.