pig tutorial - apache pig tutorial - Apache Pig - Filter Operator - pig latin - apache pig - pig hadoop
What is Filter Operator in Apache Pig ?
- Filter operator is a simple and a powerful operation which is given in Apache Pig.
- Filter operator filters only the desired data out of huge chunk of data and then it process business logic in parallel which is much faster when compared to filtering the data and running business logic on the full volume data.
- The filter operator which is used in pig is used to remove unwanted records from the data file.
- The filter operator is used to select the required tuples from a relation which is done based on the condition.
- Filter operator allows us to remove unwanted records based on a condition.
- Generate a new relation by filtering data on a relation
- We have loaded the file into Pig with the relation name wikitechy_student_details which is given below:
- Now we need to filter the data by using the Filter operator to get the details of the students who belong to the city Chennai.