...
Limitations and Known Issues
None.
Snap Views
Type | Format | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| The Snap reads input documents and sorts them in a memory buffer. |
Output | Document |
|
| This Snap sorts a document stream which show up in the sort path list. |
Error | Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter while running the Pipeline by choosing one of the following options from the When errors occur list under the Views tab:
Learn more about Error handling in Pipelines. |
Snap Settings
Info |
---|
|
Field Name | Field Type | Description | ||
Label* Default value: Sort | String | The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline. | ||
Sort Paths* | Use this field set to provide the list of paths to sort on. | |||
Sort path* Default Value: None | String/Suggestion | Paths of values in the document to sort on. For example, if the sort paths are This field supports only scalar values such as string, number, date and so on. | ||
Sort order* Default value: global | Dropdown list | Order of sorting. The available options are:
| ||
Sort order (Global) Default value: ascending | Dropdown list | Sort the specified values in ascending or descending order. | ||
Null greater Default value: Not Selected | Checkbox |
Select this checkbox to allow the Snap to consider null value greater than the non-null values. When you select this checkbox, |
null values |
are placed last when sorted in the ascending order. |
|
|
|
|
|
|
|
An empty string is not considered as null and is always smaller than non-empty strings. | |||||||||
Null-safe access Default value: Selected (True) | Checkbox | Select this checkbox if you consider the values of non-existent or incorrect sort paths as null. If unselected, the Snap validates each input document to throw errors for non-existent or incorrect sort paths. Clearing this property will result in a lower performance. | |||||||
Maximum memory Default Value: 10 | Integer | Specify the maximum memory to compute the size of the internal memory buffer for the external merge sort. The value you choose must be in MB or % , which you can specify in the Maximum memory unit. If its unit is %, the value of this property is the percentage of maximum used memory as compared to the maximum system memory.
| |||||||
Maximum memory unit Default Value: % Example: MB | Dropdown | Select the appropriate unit for the Maximum memory property.
The buffer size ranges from 10 MB to 10 GB. | |||||||
Minimum memory (MB) Default value: 500 | String/Expression | If the available memory is less than this property value while processing input documents, the Snap stops to fetch the next input document until more memory is available. This feature is disabled if this property value is 0. | |||||||
Minimum free disc space (MB) Default value: 500 | String/Expression | If the free disc space is less than this property value, the Snap stops processing input documents until more free disc space is available. This feature is disabled if this property value is 0. | |||||||
Out-of-resource timeout (minutes) Default value: 30 | String/Expression | If the Snap pauses longer than this property value while waiting for more memory available, it throws an exception to prevent the system from running out of memory or disk space. | |||||||
Snap Execution | Dropdown list |
|
Multiexcerpt include macro | ||||
---|---|---|---|---|
|
Troubleshooting:
Error | Reason | Resolution |
---|---|---|
Failed to sort data at the input document. | Insufficient free disk space to stage sort data into temporary files. | Increase the free disk space. |
Input document does not contain sort path. | If Null-safe access is false, all input documents should contain keys for sort paths. | Address the reported issue. |
Example
...
Sorting Fields in Ascending and Descending Order
...