Explain the function of ORDER-BY operator in pig?

0 votes

Hello,

I have started learning pig but finding difficulty to understand the ORDER-BY operator. Can anyone explain?

May 6 in Big Data Hadoop by sana
15 views

1 answer to this question.

0 votes

Hi,

The ORDER-BY operator is used to display the content of of a relation in a sorted order based on one or more fields.

Suppose you have a .txt file and you have LOAD the file into pig. After that, you can sort the details of that file based on any field you want. You can choose to sort by ASC or DESC manner.

For Example

grunt> file name = ORDER student_details BY age DESC; 
answered May 6 by Gitika
• 19,720 points

Related Questions In Big Data Hadoop

0 votes
1 answer

What is the use of sequence file in Hadoop?

Sequence files are binary files containing serialized ...READ MORE

answered Apr 5, 2018 in Big Data Hadoop by Ashish
• 2,630 points
654 views
0 votes
12 answers

What is Zookeeper? What is the purpose of Zookeeper in Hadoop Ecosystem?

Hey, Apache Zookeeper says that it is a ...READ MORE

answered Apr 29 in Big Data Hadoop by Gitika
• 19,720 points
3,192 views
0 votes
1 answer

How to print the content of a file in console present in HDFS?

Yes, you can use hdfs dfs command ...READ MORE

answered Apr 19, 2018 in Big Data Hadoop by Shubham
• 13,190 points
349 views
0 votes
1 answer

What do we exactly mean by “Hadoop” – the definition of Hadoop?

The official definition of Apache Hadoop given ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by Shubham
150 views
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,110 points
2,046 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,110 points
196 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
10,465 views
0 votes
1 answer

Explain the use of FILTER operator in pig?

Hey, The FILTER operator is used to select ...READ MORE

answered May 6 in Big Data Hadoop by Gitika
• 19,720 points
16 views
0 votes
1 answer

What is the use of parser in Apache pig?

Hey, It is correct that it comes under ...READ MORE

answered May 7 in Big Data Hadoop by Gitika
• 19,720 points
23 views