Below example to explain different between sort and sortByKey.
Source and target message type:
SortByKey_MM
Source data isĀ unsorted col1 and sorted col2. Both col1 and col2 is a pair of values.
SortByKey_before
Target data should be sorted col1, and the col2 is sorted according to col1, since both col1 and col2 is a pair.
SortByKey_after
row field use one-to-one mapping.
SortByKey_row
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.
SortByKey_col1
col2 use ‘sortByKey’ to sort based on col1 order from1,2,3,4 to 4,2,1,3.
SortByKey_col2
Keep on learning!
 

Different between Sort and SortByKey
Tagged on:         

Leave a Reply

Your email address will not be published.