title: Apache Pig: Extra query parameters from web log
body: <p>I am working on analyzing AWS CloudFront access logs.  </p>
  
  <p>I have the code to load the lines of the file</p>
  
  <pre><code>    raw_logs2 =LOAD 'file:///home/ec2-user/ENWRZAC68E00M.2011-02-28-18.72jA8eGh'
    USING PigStorage('\t')
    AS (
      date: chararray, time: chararray, x_edge_location: chararray, sc_bytes: int,
      c_ip: chararray, cs_method: chararray, cs_host: chararray, cs_uri_stem: chararray,
      sc_status: chararray, cs_referer: chararray, cs_user_agent:chararray, cs_uri_query: chararray
    );
  </code></pre>
  
  <p>Now I am trying to parse the query string parameters(name/value pairs):</p>
  
  <pre><code>p=searchresults&amp;s=homesforsale&amp;gad=&amp;gci=FOUNTAIN%2520VALLEY&amp;gst=CA&amp;gzi=&amp;k=fountainvalleyca&amp;ts=1298918206&amp;
  </code></pre>
  
  <p>How can I add an additional columns to my raw_logs2 table for the values of p,s and gci in the query string?</p>