title: Group key value of map in pig
body: <p>I am new to pigscript. Say, We have a file</p>
  
  <pre><code>[a#1,b#2,c#3]
  [a#4,b#5,c#6]
  [a#7,b#8,c#9]
  </code></pre>
  
  <p>pig script</p>
  
  <pre><code>A = LOAD 'txt' AS (in: map[]);
  B = FOREACH A GENERATE in#'a';
  DUMP B;
  </code></pre>
  
  <p>We know that we can take the values feeding in the key. In the above example I took the map that contains the values with respect to the key <strong>"a"</strong>.
  Assuming that I dont know the key, I want to group the values with respect to keys in a relation and dump it.</p>
  
  <pre><code>(a,{1,4,7})
  (b,{2,5,8})
  (c,{3,6,9})    
  </code></pre>
  
  <p>Does pig allows such operations or need to go with UDF? Please help me through this. Thanks.</p>