sample_sort - bruno-beloff/scs_analysis GitHub Wiki

docs > software repositories > scs_analysis > commands > filtering and aggregating data


DESCRIPTION

The sample_sort utility is used to sort the JSON documents provided on stdin, according to one or more fields indicated by the given paths. It is up to the user to ensure that each document contains a leaf node for each path, and that the type of each node is compatible (i.e. all values for a given path are numeric or are strings).

WARNING: no support is given for localised datetimes. Therefore, for example, 2022-09-16T09:00:00Z is considered not equal to 2022-09-16T10:00:00+01:00.

SYNOPSIS

sample_sort.py [-r] [-v] SORT_PATH_1 [...SORT_PATH_N]

Options
--version show program's version number and exit
-h, --help show this help message and exit
-r, --reverse sort in reverse order
-v, --verbose report narrative to stderr

EXAMPLES

csv_reader.py -v train-vE-exg.csv | sample_sort.py -v rec | csv_writer.py -v train-vE-exg-sorted.csv