title: Storing data with big and dynamic groupings / paths
body: <p>I currently have the following pig script (column list truncated for brevity):</p>
  
  <pre><code>REGISTER /usr/lib/pig/piggybank.jar;
  
  inputData = LOAD '/data/$date*.{bz2,bz,gz}' USING PigStorage('\\x7F')
  PigStorage('\\x7F')
  AS (
  SITE_ID_COL                 :int,--                     = Item Site ID
  META_ID_COL                 :int,--                 = Top Level (meta) category ID
  EXTRACT_DATE_COL            :chararray,--          = Date for the data points
  ...
  )
  
  SPLIT inputData INTO site0 IF (SITE_ID_COL == 0), site3 IF (SITE_ID_COL == 3), site15 IF (SITE_ID_COL == 15);
  
  STORE site0 INTO 'pigsplit1/0/' USING org.apache.pig.piggybank.storage.MultiStorage('pigsplit1/0/','2', 'bz2', '\\x7F');
  STORE site3 INTO 'pigsplit1/3/' USING org.apache.pig.piggybank.storage.MultiStorage('pigsplit1/3/','2', 'bz2', '\\x7F');
  STORE site15 INTO 'pigsplit1/15/' USING org.apache.pig.piggybank.storage.MultiStorage('pigsplit1/15/','2', 'bz2', '\\x7F');
  </code></pre>
  
  <p>And it works great for what I wanted it to do, but there's actually at least 22 possible site IDs and I'm not certain there's not more. I'd like to dynamically create the splits and store into paths based on that column. Is the easiest way to do this going to be through a two step usage of the MultiStorage UDF, first splitting by the site ID and then loading all those results and splitting by the date? That seems inefficient. Can I somehow do it through GROUP BYs? It seems like I should be able to GROUP BY the site ID, then flatten each row and run the multi storage on that, but I'm not sure how to concatenate the GROUP into the path. </p>