Apache Pig ORDER BY Operator
The Apache Pig ORDER BY operator sorts a relation based on one or more fields. It maintains the order of tuples.
Example of ORDER BY Operator
In this example, we return only two tuples from all the tuples in the relation.
Steps to execute ORDER BY Operator
Here, we got the desired output.