# tExternalSortOutput

Sorts input data based on one or several columns, by type (numeric or alphabetical) and order (ascendant or descendent), using an external sort application, and passes the sorted data to the subsequent component.

## tExternalSortOutput Standard properties

These properties are used to configure tExternalSortOutput running in the Standard Job framework.

The Standard tExternalSortOutput component belongs to the File family.

The component in this framework is available in all Talend products.

## Basic settings

| Properties | Description |
| --- | --- |
| Schema and Edit<br>Schema | A schema is a row description, it defines the number of fields to be processed and<br>passed on to the next component. The schema is either Built-in or stored remotely in the<br>Repository.<br><br>Click Edit<br>schema to make changes to the schema. If the current schema is of the Repository type, three options are available:<br><br><ul> <li> <p> <span>View schema</span>: choose this                option to view the schema only.</p> </li> <li> <p> <span>Change to built-in property</span>:                choose this option to change the schema to <span>Built-in</span> for local changes.</p> </li> <li> <p> <span>Update repository connection</span>:                choose this option to change the schema stored in the repository and decide whether                to propagate the changes to all the Jobs upon completion.</p> <p>If you just want to                propagate the changes to the current Job, you can select <span>No</span> upon completion and choose this schema metadata                again in the <span>Repository Content</span>                window.</p> </li> </ul><br><br>Click Sync columns to retrieve<br>the schema from the previous component connected in the Job.<br><br><ul> <li> <span>Built-in</span>: The schema will be                        created and stored locally for this component only. For more information about a component schema in its <span>Basic settings</span> tab, see <a href="https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/basic-settings-tab" target="_blank">Basic settings tab</a>.</li> <li> <span>Repository</span>: The schema already                        exists and is stored in the Repository, hence can be reused in                        various projects and Job flowcharts. For more information about a component schema in its <span>Basic settings</span> tab, see <a href="https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/basic-settings-tab" target="_blank">Basic settings tab</a>.</li> </ul> |
| File Name | Name or path to the file to be processed and/or the variable to be<br>used.<br><br>For further information about how to define and use a variable in a Job, see [Using contexts and variables](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/contexts-and-variables). |
| Field Separator | Type in a character, a string, or a regular expression to<br>separate fields. |
| Criteria | Click the plus button to add as many lines as required for the<br>sort to be complete. By default, the first column defined in your schema is<br>selected.<br><br><ul> <li> <span>Schema column</span>: Select the column                        label from your schema, which the sort will be based on. Note that                        the order is essential as it determines the sorting priority.</li> <li> <span>Sort type</span>: Numerical and                        alphabetical order are proposed.</li> <li> <span>Order</span>: Ascending or descending                        order.</li> </ul> |
| Maximum memory | Type in the size of physical memory you want to allocate to sort<br>processing. |
| Temporary directory | Specify the temporary directory to process the sorting<br>command. |
| Set temporary input file directory | Select the check box to activate the field in which you can<br>specify the directory to handle your temporary input file. |
| External command "sort" path | Enter the path to the external file containing the sorting<br>algorithm to use. |
| Add a dummy EOF line | Select this check box when using the tAggregateSortedRow component. |
| Create directory only if does not exist | Select this option to have the temporary directories created if the<br>directories do not exist. |

## Advanced settings

| Properties | Description |
| --- | --- |
| tStatCatcher Statistics | Select this check box to gather the Job processing metadata at the<br>Job level as well as at each component level. |

## Global Variables

| Variables | Description |
| --- | --- |
| Global Variables | ERROR\_MESSAGE: the error message generated by the<br>component when an error occurs. This is an After variable and it returns a string. This<br>variable functions only if the Die on error checkbox is<br>cleared, if the component has this checkbox.<br><br><br>NB\_LINE: the number<br>of rows read by an input component or transferred to an output component. This is an<br>After variable and it returns an integer.<br><br>A Flow variable functions during the execution of a component<br>while an After variable functions after the execution of the component.<br><br>To fill up a field or expression with a variable, press Ctrl+Space to access the variable list and choose the variable to use from<br>it.<br><br>For more information about variables, see [Using contexts and variables](https://help.qlik.com/talend/r/en-US/8.0/studio-user-guide/contexts-and-variables). |

## Usage

| Usage guidance | Description |
| --- | --- |
| **Usage rule** | This component handles flow of data therefore it requires input<br>and output, hence is defined as an intermediary step. |