[Solved-1 Solutions] Sort related bag in pig ?
- A bag is collection of tuples.
- To understand bag we need to understand tuple and field.
- A field is a piece of data
- An ordered set of fields.
- Just as an example, lets assume we have products data which has product name and its price information stored in file and we are loading it in pig using below script.
If we have a Pig script which generated a relation
We need to sort A based on B.y, however the following piece gives me error:
Syntax error, unexpected symbol at or near z
- Use DESC instead of DSC.
- We can sort related bags in the tuple by using DESC