Does PIG support IN clause?
filtered = FILTER bba BY reason not in ('a','b','c','d');
or should i split it up into multiple OR's?
Thanks!
You can use below udf from Apache DataFu instead. This will help you to avoid writing lot of OR.
https://github.com/linkedin/datafu/blob/master/src/java/datafu/pig/util/InUDF.java
Pig 0.12 added In operator http://www.edureka.co/blog/operators-in-apache-pig-diagnostic-operators/ see bottom of page..release notes. Haven't located it in official docs (apart from bare mention in release notes)
I didn't find it in any of the samples in the documentation.
You can get by using AND/OR/NOT
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With