Sorting data
To have the data sorted, something that we haven't cared about until now, is a very common requirement in real use cases. It can be a purpose by itself, but it's also a prerequisite for many of the operations that we will discuss in this chapter.
Sorting a dataset with the sort rows step
Sorting with PDI is really easy to implement but there are a couple of settings that you have to consider when doing it. Learning to do that is the objective of this quick tutorial.
For this exercise, we will use, one more time, the sales_data.csv
file that we used in Chapter 4, Reading and Writing Files. Here, you have sample lines of the file:
ORDERDATE,ORDERNUMBER,ORDERLINENUMBER,PRODUCTCODE,PRODUCTLINE,QUANTITYORDERED,PRICEEACH,SALES 2/20/2004 0:00 ,10223,10,S24_4278 ,Planes ,23,74.62,1716.26 11/21/2004 0:00,10337,3,S18_4027 ,Classic Cars ,36,100 ,5679.36 6/16/2003 0:00 ,10131,2,S700_4002,Planes ,26,85.13,2213.38 7/6/2004 0:00 ,10266,5,S18_1984 ,Classic Cars ,49,100 ,6203.4 10/16/2004 0:00,10310...