Below example to explain different between sort and sortByKey.
Source and target message type:
col1 use ‘sort’ to sort ascending from C,B,D,A to A,B,C,D.
Before sort need to use ‘removeContext’, because’ sort’ expect list of values under single context.
After sort need to use SplitByValue [Each value], to restore back context change for each values.
col2 use ‘sortByKey’ to sort based on col1 order from1,2,3,4 to 4,2,1,3.
Keep on learning!