The filter specifiers each specify a processing step which is performed on a table, transforming an input table to an output one. You can have any combination of them, and they are used in the order that they are given on the command line. They are like filter-type commands in a Unix pipeline. Some of them have additional optional or mandatory arguments.
-select <expr>
<expr>
evaluates to true.
<expr>
is an expression using the syntax described
in Section 4 with a boolean-type value.
-sort [-down] [-nullsfirst] <colid-list>
<colid-list>
. <colid-list>
is a space-separated list of column identifiers
(names, $IDs or numbers, where 1 is the first column).
One or more columns may be specified: sorting is done on the
values in the first-specified field, but if they are equal the
tie is resolved by looking at the second-specified field, and so on.
If the -down
flag is used,
the sort order is descending instead
of ascending. If the -nullsfirst
flag is used, blank
entries are considered to come at the start of the collation sequence
instead of the end.
-sortexpr <expr>
<expr>
is described in Section 4.
Its value must be of a type that it makes sense to sort, for instance
numeric.
-every <step>
<step>
'th row in the result,
starting with the first row.
-head <nrows>
<nrows>
rows of the table.
-tail <nrows>
<nrows>
rows of the table.
-addcol [-after <col-id> | -before <col-id>]
<col-name> <expr>
<col-name>
defined by the algebraic expression
<expr>
.
Expression syntax is described in Section 4. By default
the new row appears after the last row of the table, but you
can position it using either the -after
or
-before
flags. In either
case, a <col-id>
is either the column's name
(if it is syntactically a Java identifier),
or its number (the first column is 1), or its $ID
($1
is the first column).
-keepcols <colid-list>
<colid-list>
, in that order.
<colid-list>
is space-separated.
col-id
is either the column's name
(if it is syntactically a Java identifier) or its number
(the first column is 1) or its $ID
($1
is the first column).
-delcols <colid-list>
<colid-list>
is a space-separated list of
identifiers which are either a column's name
(if it is syntactically a Java identifier) or its number
(the first column is 1) or its $ID
($1
is the first column).
-explode
-cache
-progress
Specifying -verbose
has the effect of inserting a
-progress
flag at the start of the pipeline,
so you can see how much progress has been made through the initial
input table.
By putting a -progress
at different points in pipeline you can monitor how
far different stages of the processing have progressed.
If you insert more than one -progress
however,
output to the terminal is going to get quite messy.
-random
-sequential
If no filter specifiers are given, the input table will be sent directly to its destination without any modifications.