About this task
Two tPigStoreResult components are used to write each of the sorted data into HDFS.
Double-click either the first tPigStoreResult component to open its Component view to write the data sorted by name.
- In the Result file field, enter the directory where the data will be written. This directory will be created if it does not exist. In this scenario, we put /user/ychen/sort/tPigreplicate/byName.csv.
- Select Remove result directory if exists.
- In the Store function list, select PigStorage.
- In the Field separator field, enter the semicolon ;.
- Do the same for the other tPigStoreResult component but set another directory for the data sorted by state. In this scenario, it is /user/ychen/sort/tPigreplicate/byState.csv.