sort mapping simply sorts data by the specified columns and sort order. Note that
downstream mappings may destroy the sort order again, so this should be the last operation
before you save a result using an output operation.
mappings: stations_sorted: kind: sort input: stations columns: - name: asc - date: desc
broadcast(optional) (type: boolean) (default: false): Hint for broadcasting the result of this mapping for map-side joins.
cache(optional) (type: string) (default: NONE): Cache mode for the results of this mapping. Supported values are
NONE- Disables caching of teh results of this mapping
DISK_ONLY- Caches the results on disk
MEMORY_ONLY- Caches the results in memory. If not enough memory is available, records will be uncached.
MEMORY_ONLY_SER- Caches the results in memory in a serialized format. If not enough memory is available, records will be uncached.
MEMORY_AND_DISK- Caches the results first in memory and then spills to disk.
MEMORY_AND_DISK_SER- Caches the results first in memory in a serialized format and then spills to disk.
columns(mandatory) (list:kv): Specifies the sort columns. The column names are specified as the key and the sort order as the values.
descare supported for sort order.
filter(optional) (type: string) (default: empty): An optional SQL filter expression that is applied after the sort operation.
main- the only output of the mapping