For many usecases, you can do something like this: result = FOREACH entry GENERATE (a == b ? c1 : c2);
More complicated cases may need to use pig embedding: http://ofps.oreilly.com/titles/9781449302641/embedding.html Sal Uryasev [email protected] ________________________________________ From: Srini Naravatla [[email protected]] Sent: Wednesday, June 06, 2012 9:10 PM To: [email protected] Subject: pig conditional operators how do i go about writing simple " CASE " statement in apache pig. example ------------ case when a1 = b1 then c1 when a = b2 then c2 end any inputs appreciated.
