title: How to write STORE command in FOREACH in PIG
body: <p>I have following relation of data grouped by a year.</p>
  
  <p>DESCRIBE YEARDATA output is:</p>
  
  <pre><code>YEARDATA: {timestamp: chararray,year: chararray,month: chararray,day: chararray,hour: chararray,minutes: chararray,seconds: chararray}
  </code></pre>
  
  <p>I wanted to store this data on year/month/day based partition.</p>
  
  <p>How to write following logic using PIG?</p>
  
  <pre><code>FOREACH YEARDATA {
    --- GENERATE HDFS URL using UDF generateUrl(year, month, day) 
    ---- STORE YEARDATA INTO url USING PigStore(,);
  };
  </code></pre>
  
  <p>Please suggest.</p>