pig tutorial - apache pig tutorial - Apache Pig - Illustrate Operator - pig latin - apache pig - pig hadoop
What is illustrate operator?
- The illustrate operator gives you the step-by-step execution of a sequence of statements.
- ILLUSTRATE operator is used to review how data is transformed through a sequence of Pig Latin statements.
- ILLUSTRATE command is your best friend when it comes to debugging a script.
- Prints the schema of the relation and a tuple example at standard output
Syntax:
The syntax of the illustrate operator is
Example:
Assume we have a file student_data.txt in HDFS with the following content.
And read it into a relation student using the LOAD operator as shown below.
Now, illustrate the relation named student as shown below.
Output:
On executing the above statement, you will get the following output.