You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Aleksandr Elbakyan <ra...@yahoo.com> on 2012/05/03 20:58:52 UTC
Pig question
Hello All,
I was wandering if it is possible to filter all groups in pig which have size N. This sounds like something common but can not find the way to do it
Please help :)
Thanks,
Re: Pig question
Posted by Aleksandr Elbakyan <ra...@yahoo.com>.
Thanks for help
----- Original Message -----
From: Mathias Herberts <ma...@gmail.com>
To: common-user@hadoop.apache.org; Aleksandr Elbakyan <ra...@yahoo.com>
Cc:
Sent: Thursday, May 3, 2012 12:04 PM
Subject: Re: Pig question
B = GROUP A BY x;
C = FOREACH B GENERATE group,SIZE(B),B;
D = FILTER C BY $1 == N;
On Thu, May 3, 2012 at 8:58 PM, Aleksandr Elbakyan <ra...@yahoo.com> wrote:
> Hello All,
> I was wandering if it is possible to filter all groups in pig which have size N. This sounds like something common but can not find the way to do it
>
> Please help :)
>
>
> Thanks,
Re: Pig question
Posted by Mathias Herberts <ma...@gmail.com>.
B = GROUP A BY x;
C = FOREACH B GENERATE group,SIZE(B),B;
D = FILTER C BY $1 == N;
On Thu, May 3, 2012 at 8:58 PM, Aleksandr Elbakyan <ra...@yahoo.com> wrote:
> Hello All,
> I was wandering if it is possible to filter all groups in pig which have size N. This sounds like something common but can not find the way to do it
>
> Please help :)
>
>
> Thanks,