You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Kelvin Moss <km...@yahoo.com> on 2010/03/09 05:18:40 UTC

Conditional exit

 
Is there a way to use the bincond operator, or some other way to do a conditional exit in Pig script? Say if the value of variable given to script is x then do this, but exit if it is y.
 
Thanks!


      

RE: Conditional exit

Posted by Richard Ding <rd...@yahoo-inc.com>.
Pig Latin doesn't support conditional statements (such as if-else) if this is what you want. It has a SPLIT statement that allows multiple outputs.   

Thanks,
-Richard
-----Original Message-----
From: Kelvin Moss [mailto:km_jr_usenet@yahoo.com] 
Sent: Monday, March 08, 2010 8:19 PM
To: pig-user@hadoop.apache.org
Subject: Conditional exit

 
Is there a way to use the bincond operator, or some other way to do a conditional exit in Pig script? Say if the value of variable given to script is x then do this, but exit if it is y.
 
Thanks!