Javatpoint Logo
Javatpoint Logo

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.
Apache Pig IN Function
  • Check the tuples inserted in the text files.
Apache Pig IN Function
  • 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.
Apache Pig IN Function
  • Let's return the filer data.
Apache Pig IN Function

Here, we got the desired output.

Next TopicMAX Function

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA