Menu

Copy

Chris DeGreef

Funnel can be used as a copy utility as well - it is not just a sort utility. Copy is implemented as a sort on the row number. The row number is a "hidden" field on each row that starts at 0 for the first row and increases by one for each row as it is read.

Funnel can reverse the order of the original file as well. It just sorts the rows by a descending row number.

There are three possible values for the "--copy" parameter.

Copy Value Description
original don't change the order of the rows
reversed reverse the order of the rows
byKey specify keys to control the order

The "byKey" value is the default for Funnel. It is how to explicitly request a sort. These two examples would produce the same results. Copying with a key and Sorting on the entire contents of a row.


Related

Wiki: Home

MongoDB Logo MongoDB