Hey,
The FILTER operator is used to select the required tuples from a relation based on 'condition'.
Suppose you have a .txt file and have loaded the file in Pig. Now using FILTER operator we will get the details of that particular file with given condition.
grunt> file_name = FILTER student_details BY city == 'Banglore';
Here, based on condition we will get students details who lives in Banglore.