pig tutorial - apache pig tutorial - Apache Pig - TOTUPLE() - pig latin - apache pig - pig hadoop
What is TOTUPLE() function in Apache Pig ?
- The TOTUPLE() function is used convert one or more expressions to the data type tuple.
Syntax
Example
Ensure that we have a file named wikitechy_emp_details.txt in the HDFS directory /pig_data/, with the following content.
Wikitechy_emp_details.txt
You have loaded this file into Pig with the relation name emp_data as given below.
Now convert the id, name and age of each student (record) into a tuple.
Verification
Now you can verify the contents of the totuple schema using the Dump operator as given below.