Sorting the dataset is a very useful and common task. Sorting is really easy to do in PDI, and we will demonstrate it with a simple transformation. We will take the files of the surveys that we used in the previous chapter, and we will sort the data by neighborhood and room_type columns, and then by the reviews column in descending order. In order to do this, go through the following steps:
- Open any of the transformations created in the last chapter that read files with surveys. Save the transformation with a different name.
- Drag a Sort rows step from the Transform folder and create a hop from the Text file input toward this new step.
- Double-click the step and configure it as shown in the following screenshot: