0

I want to simulate an if-then-else block in a pig script.

PseudoCode :

if(flag=set) then STORE INTO '<path>' USING <StorageUDF()> else do nothing

Is there a way I can use the SPLIT command?

Dubby
  • 1,154
  • 3
  • 16
  • 31
  • 2
    Possible duplicate of [Pig Conditional Operators](http://stackoverflow.com/questions/16975210/pig-conditional-operators) – Ben Watson Nov 20 '15 at 17:12
  • See http://stackoverflow.com/questions/17669522/is-there-any-conditional-if-like-operator-in-apache-pig, http://stackoverflow.com/questions/16975210/pig-conditional-operators, http://stackoverflow.com/questions/18913764/pig-split-lack-of-default-or-if-else – Ben Watson Nov 20 '15 at 17:13
  • No it's not. My question is around being able to put a conditional on executing an entire statement and not setting variables – Dubby Nov 21 '15 at 07:31

0 Answers0