Sort data within the table. Both field names (string) or indices (integer) can be used to identify the Key fields.
Example
Listing multiple key fields will order values by each field in descending priority.
Example Input
Order-ID | Campaign-ID | metric_1 |
2045 | 75 | AAA |
2045 | 11 | BBB |
1135 | 3 | CCC |
2045 | 45 | DDD |
1140 | 67 | EEE |
Example Output
Order-ID | Campaign-ID | metric_1 |
1135 | 3 | CCC |
1140 | 67 | EEE |
2045 | 11 | BBB |
2045 | 45 | DDD |
2045 | 75 | AAA |
I Ain't Afraid of No Code!
[
[
"sort",
{
"subtable": null,
"reverse": false,
"key": [
"Order-ID",
"Campaign-ID"
],
"_comment": null
}
]
]
param str subtable: Name a subtable in which output will be stored (will create subtable where necessary).
param boolean reverse: Sort direction. true = descending order.
param list key: Fields by which sort operation is performed in given order.
param str comment: A comment that will appear in the Transformation UI.
Comments
0 comments
Article is closed for comments.