title: PIG - Filter or how to get in side of a bag or tuple
body: <p>AS you can see we can apply filter to the first one because, we can used aggregate on the  temperature. Now how do we apply  the second filter on STRINGS?</p>
  
  <p>We are only trying to filter e with conditions clear and partly cloudy. </p>
  
  <pre><code>Weather = LOAD 'hdfs:/home/hduser/final/Weather.csv' USING PigStorage(',');
  A = FOREACH Weather GENERATE (int)$0 AS year, (int)$1 AS month, (int)$2 AS day, (int)$4 AS temp, $14 AS cond, (double)$5 as dewpoint , (double)$10 as wind;
  
  
  group_by_day = GROUP A BY (year,month,day);
  </code></pre>
  
  <p>Schema:</p>
  
  <pre><code>   {day: (year: int,month: int, day: int), temperature {(temp: int)},                   
  
     condition: {cond: bytearray)}, dewPoint: {(dewpoint: double)} windSpeed:
  
     {(wind: double)}}
  </code></pre>