A = load 'foo.txt' using PigStorage as (x : chararray, y : int); B = group A by x; C = group B by group; describe C;
-- we got -- C: {group: chararray,B: {group: chararray,A: {x: chararray,y: int}}} D = foreach C generate B.(group, A); -- this works describe D; E = foreach C generate B.(group, A.(x)); describe E; --- pig returns syntax error, but should this work? Or is there a patch for it? thanks, lin