Sort by Two Keys

Logic name
Sort by Two Keys (Document Mapper)
Function
This logic sorts by two conditions.
Data types
Location |
Type |
---|---|
First input handler |
Loop |
Second input handler |
String |
Third input handler |
String |
Logic output |
Loop |
For details, refer to Logic specifications.
Properties
Category |
Property |
Description |
---|---|---|
Required settings |
Sort order |
Specify the sort order. |
Required settings |
Order |
Specify the order. |
Required settings |
Sort order |
Specify the sort order. |
Required settings |
Order |
Specify the order. |
Comment |
Comment |
You can write a description of the logic. It doesn't affect the conversion process. |
Function details
Sort order
For Sort order, refer to Sort order of the "Sort by Key" logic.
Criteria for sort order
The first sorting condition is the upper property, and the second is the below property.
The second sorting condition is applied to determine the order when the key data for the first sorting condition is equal in all targets.
Specification limits
-
You are not allowed to map the input data specified as a key to an input handler of the subsequent collective logics (Sum, Average, Number of Node, Maximum Node, and Minimum Node).
-
You can't use data including null as a key.
Logic sample
Mapping definition

Logic settings and processing result
The logic sorts the input data in ascending order by the values of the columns "state code" and "city code" as the first key and the second key respectively, prioritizing lowercase characters.
Property settings
Property |
Setting |
---|---|
Sort order |
Lowercase-first string order |
Order |
Ascending |
Sort order |
Lowercase-first string order |
Order |
Ascending |
Input data
001,Tokyo,108,Chiyoda ku |
003,Chiba,301,Chiba city |
001,Tokyo,101,Bunkyo ku |
002,Osaka,201,Osaka city |
001,Tokyo,128,Musashino city |
Output data
001,Tokyo,101,Bunkyo ku |
001,Tokyo,108,Chiyoda ku |
001,Tokyo,128,Musashino city |
002,Osaka,201,Osaka city |
003,Chiba,301,Chiba city |
For a list of logics, refer to Mapper Logic Guide.