We assume that you have already learned what is described in:
If you want to find the right Transformer for your purposes, see Transformers Comparison.
SortWithinGroups sorts input records within groups of records according to a sort key.
Component | Same input metadata | Sorted inputs | Inputs | Outputs | Java | CTL |
---|---|---|---|---|---|---|
SortWithinGroups | - | yes | 1 | 1-n | - | - |
SortWithinGroups receives data records (that are grouped according to group key) through single input port, sorts them according to sort key separately within each group of adjacent records and copies each record to all connected output ports.
Port type | Number | Required | Description | Metadata |
---|---|---|---|---|
Input | 0 | yes | For input data records | Any |
Output | 0 | yes | For sorted data records | Input 01) |
1-n | no | For sorted data records | Input 01) |
Legend:
1): Metadata can be propagated through this component. All output metadata must be the same.
Attribute | Req | Description | Possible values |
---|---|---|---|
Basic | |||
Group key | yes | Key defining groups of records. Non-adjacent records with the same key value are considered to be of different groups and each of these different groups is processed separately and independently on the others. See Group Key for more information. | |
Sort key | yes | Key according to which the records are sorted within each group of adjacent records. See Sort Key for more information. | |
Advanced | |||
Buffer capacity | Maximum number of records parsed in memory. If there are more input records than this number, external sorting is performed. | 10485760 (default) | 1-N | |
Number of tapes | Number of temporary files used to perform external sorting. Even number higher than 2. | 8 (default) | 2*(1-N) | |
Temp directories | List of names of temporary directories that are used to create temporary files to perform external sorting separated by semicolon. | java.io.tmpdir system property (default) | other directories |
Remember that SortWithinGroups processes
the records in which the same fields of the Sort
key attribute have null
values as if
these nulls
were equal.