| 1. |
What Is The Use Of Having Filters In Apache Pig? |
|
Answer» Just like the where clause in SQL, APACHE Pig has filters to extract records based on a given condition or PREDICATE. The record is passed down the pipeline if the predicate or the condition turn to true. Predicate contains various operators like ==, <=,!=, >=. Example:- X= load ‘inputs’ as(name,address) Y = FILTER X by symbol matches ‘MR.*’; Just like the where clause in SQL, Apache Pig has filters to extract records based on a given condition or predicate. The record is passed down the pipeline if the predicate or the condition turn to true. Predicate contains various operators like ==, <=,!=, >=. Example:- X= load ‘inputs’ as(name,address) Y = filter X by symbol matches ‘Mr.*’; |
|