Skip to content

Sort rows filter

David Megginson edited this page May 12, 2017 · 2 revisions
Sort rows filter form

The Sort rows filter on the Recipe page allows you to sort a dataset using specific columns (or all columns) as sort keys.

WARNING: unlike most Filters, the Sort rows filter requires reading the entire dataset into memory at once, so it may timeout on very large datasets (hundreds of thousands of rows).

Options

Use these tags for sorting: a list of tag patterns to use as sort keys. If specified, the HXL Proxy will use the columns in the order specified for sorting the dataset; otherwise, it will use all tagged columns, from left to right. Example: "date,sector,org"

Reverse order: if checked, sort from highest to lowest (or last to first alphabetically).

Example

Unsorted

#org #sector #adm1+name #adm1+code #targeted
UNICEF Education Coast X001 5000
Save the Children Education Plains X002 300
IOM CCCM Coast X001 1500
UNICEF Protection Plains X002 8000

Sorted by #sector,#org

#org #sector #adm1+name #adm1+code #targeted
IOM CCCM Coast X001 1500
Save the Children Education Plains X002 300
UNICEF Education Coast X001 5000
UNICEF Protection Plains X002 8000

Sorted by #targeted (reverse order)

#org #sector #adm1+name #adm1+code #targeted
UNICEF Protection Plains X002 8000
UNICEF Education Coast X001 5000
IOM CCCM Coast X001 1500
Save the Children Education Plains X002 300

Use cases

Arrange records in order of date (oldest to newest, or newest to oldest).

Make sure that all records for the same #org or #sector are grouped together.

Arrange data so that it is easier to check visually (e.g. all organisation names in alphabetical order, for checking typos).

Prepare data for a Deduplicate rows filter, ensuring that the record to keep appears first.

Clone this wiki locally