Sort by Multiple Keys
Funnel allows for any number of sort keys for one sort. Multiple keys are strung together as a single key for the sorting process. Each key can be a different type, and a different direction. This example will sort on two keys.
The general format of a key specification is --keys (one key definition)(a second key)(a third key) and so on.
A key definition is (keyType, --offset offset, --length length, direction, --format format).
direction and format are optional. The offset is zero-relative.
Direction values:
ASC– ascendingDESC- descendingAASC- absolute ascendingADESC- absolute descending
Absolute direction means upper and lowercase are considered the same, and positive and negative numbers are the same for sorting purposes.
Key Types:
String– normal readable character data like “ABC”Integer– a readable integer value like “1234″Float– a readable floating point number like “456.78″BInteger– an encoded integer valueBFloat– an encoded floating point number- Date – a readable Java-like date
The encoded keys are the standard Java encoded numbers for Byte, Short, Integer, Long, Float, and Double. The length of the key determines which one it is.
BIntegerlength 1 = ByteBIntegerlength 2 = ShortBIntegerlength 4 = IntegerBIntegerlength 8 = LongBFloatlength 4 = FloatBFloatlength 8 = Double
