ExtSort

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.

Short Summary

ExtSort sorts input records according to a sort key.

Component Same input metadata Sorted inputs Inputs Outputs Java CTL
ExtSort-
no
11-N--

Abstract

ExtSort changes the order in which records flow through a graph. How to compare two records is specified by a sorting key.

The Sort key is defined by one or more input fields and the sorting order (ascending or descending) for each field. The resulting sequence depends also on the key field type: string fields are sorted in ASCIIbetical order while the others alphabetically.

The component receives data records through the single input port, sorts them according to specified sort key and copies each of them to all connected output ports.

Icon

Ports

Port typeNumberRequiredDescriptionMetadata
Input0
yes
for input data recordsthe same input and output metadata [ 1)]
Output0
yes
for sorted data records
1-N
no
for sorted data records

[ 1)] As all output metadata must be same as the input metadata, they can be propagated through this component.

ExtSort Attributes

AttributeReqDescriptionPossible values
Basic
Sort key
yes
Key according to which the records are sorted. 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.8000 (default) | 1-N
Number of tapes Number of temporary files used to perform external sorting. Even number higher than 2.6 (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
Deprecated
Sort order Order of sorting (Ascending or Descending). Can be denoted by the first letter (A or D) only. The same for all key fields.Ascending (default) | Descending
Sorting locale Locale that should be used for sorting.none (default) | any locale
Case sensitive  In the default setting of Case sensitive (true), upper-case and lower-case characters are sorted as distinct characters. Lower-cases precede corresponding upper-cases. If Case sensitive is set to false, upper-case characters and lower-case characters are sorted as if they were the identical.true (default) | false
Sorter initial capacity does the same as Buffer capacity8000 (default) | 1-N

Advanced Description

Sorting Null Values

Remember that ExtSort processes the records in which the same fields of the Sort key attribute have null values as if these nulls were equal.