Sort Process Object
The Integrator Sort process object sorts the data flow based on a set of columns, changing the order in which the data appears in subsequent objects in the data flow. The Sort object will sort the data in memory if possible. Otherwise it will use temporary files to perform an external sort.
The sort preserves all input rows without collapsing or otherwise combining the data. Combining data after a sort can be accomplished by using the Squash process object.
Sort Attributes
| Attribute | Type | Description |
|---|---|---|
| process_type (required) |
String | Identifies the object as a Sort process object. The value of this string is "sort". |
| input (required) |
String | Defines the object from which the data flow is arriving. |
| sort_columns (required) |
Array of Strings | Defines the input columns that are used as keys in the sort, in the order they control the sort. The primary key appears first, the secondary key appears second, etc. If rows match on all sort column values, their order in the output will be arbitrary, that is, sort order for duplicates is undefined. If order stability is required, add more columns to the sort. |
| sort_size | Integer |
Defines the approximate amount of memory assigned for the sort, in bytes. If the amount of data
exceeds this memory, the sort object will switch to an external sort, using a set of temporary files
for intermediate results. This attribute is optional; the default sort_size is 512,000,000 (512
megabytes) when using the 64-bit Integrator and 128,000,000 (128 megabytes) when using the
32-bit Integrator. Specify it without commas or quotes, for example, sort_size=250000000. NOTE: This attribute is Sort Size in Visual Integrator. |
| numeric_columns | Boolean |
Defines which sort columns are treated as numeric values. Values in these columns will be compared numerically, instead of alphabetically. NOTE: This attribute is Numeric in Visual Integrator. |
| temp_directory | String |
Defines the directory which will be used to hold the temporary files for the sort. These files will
be named: NOTE: This attribute is Temp Directory in Visual Integrator. |
| reverse | Boolean | Controls whether or not the sort is performed in reverse order. If the reverse attribute is present and not "false", then the sort will be performed in reverse order. |
| reverse_columns | Array of Strings |
Defines which sort columns are sorted in reverse order. The values in these individual columns will be sorted in descending order unless modified by the row-level reverse attribute. The reverse_columns attribute and the reverse attribute are combined with an exclusive OR. If a column is listed in reverse_columns and the reverse attribute is "true", the reverse is applied twice and the column is sorted in ascending order. NOTE: This attribute is Reverse All in Visual Integrator. |
| locale | Boolean | Controls whether or not the sort comparisons are done using the locale collation sequence, to
reflect international sort sequences. If set to "false" sort comparisons are not done using the locale
collation sequence. If set to "true", comparisons are done using the current locale (as defined by
the system). When set to "true", this attribute overrides the case_sensitive attribute. The default
is "false". The sort order varies by platform. For example, Windows and UNIX use ASCII characters, while the OS/400 uses EBCDIC characters. |
| case_sensitive | Boolean |
Controls whether or not the sort comparisons are case sensitive. If this attribute is "true", then the comparisons are done in a case sensitive fashion. This attribute is optional, but defaults to "true". (See locale attribute above.) NOTE: This attribute is Case Sensitive in Visual Integrator. |
| trace_after | Sub-object | Traces data flows leaving the specified object, which makes debugging scripts easier. This is equivalent to adding a Trace process object immediately after the current object. See Embedded Trace Object for more on using trace sub-objects. |
| trace_before | Sub-object | Traces data flows entering the specified object. This is equivalent to adding a Trace process object immediately before the current object. See Embedded Trace Object for more on using trace sub-objects. |