pig-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Baoshi Yan <b...@linkedin.com>
Subject Re: should the following query work?
Date Sat, 11 Dec 2010 01:02:00 GMT
This is kind of similar to the problem I posted on this list a few days back. Basically, Pig
seems to have problem parsing the statement where you try to access the inner bag of another
inner bag. I would also like to know if there is a fix or walk-around for this problem.


Baoshi Yan
Sr. Software Engineer
SNA / RecEngine / Data Standardization
byan@linkedin.com



On Dec 9, 2010, at 3:34 PM, Lin Guo wrote:

> 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


Mime
View raw message