pig tutorial - apache pig tutorial - Apache Pig - Diagnostic Operators - pig latin - apache pig - pig hadoop
What is Diagnostic Operators?
- Dump operator
- Describe operator
- Explanation operator
- Illustration operator
The Dump operator is used to run the Pig Latin statements and display the results on the screen. It is generally used for debugging Purpose.
Given below is the syntax of the Dump operator.
- Prints the content of a relation at standard output
Assume we have a file student_data.txt in HDFS with the following content.
And we have read it into a relation student using the LOAD operator as shown below.
Now, print the contents of the relation using the Dump operator as shown below.
Once you execute the above Pig Latin statement, it will start a MapReduce job to read data from HDFS. It will produce the following output.