FILTER-BY
Tuesday, February 22, 2011
1:11 PM
FILTER-BY: omit rows (records) not matching an expression
<alias> = FILTER <alias2> BY <expression>;
makes <alias> the result of omitting rows from <alias2> not satisfying <expression>.
Expression can be any boolean expression of the columns or, optionally, a user-defined Java function with a boolean value. 
Example:
rich = FILTER people BY salary>0; 
Let the alias 'rich' to refer to the records/tuples in relation 'people' where the column salary>0; ignore all other records.  
Note: destination must be different than source, because this is an implied Map/Reduce; symbols are mapped to HDFS filenames. 