Hope you are doing well,


We have gone through your code, and as per the analysis, you were using totuple keyword which will not be recognized by Pig shell.


So I will suggest you to use TOTUPLE  keyword which will be recognized by Pig shell.


Please refer to the below screenshots for clarification


 

image



 

image


Please try this and let us know if you face any issue.