79
Apache Pig IN Function
The Apache Pig IN function is used to reduce the requirement for multiple OR conditions. It facilitates to check if the current expression matches with any value exist in a list.
Example of IN Function
In this example, we filter the tuples by applying IN operator on values of the list.
Steps to execute IN Function
- Create a text file in your local machine and insert the list of tuples.
- Check the tuples inserted in the text files.
- Upload the text files on HDFS in the specific directory.
- Open the pig MapReduce run mode.
- Load the file that contains the data.
- Now, execute and verify the data.
- Let’s return the filer data.
Here, we got the desired output.
Next TopicMAX Function