Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # user >> this nested foreach worked in 0.8.1, no longer works in 0.10


+
Steve Bernstein 2012-05-31, 19:09
+
Jonathan Coveney 2012-05-31, 20:08
+
Steve Bernstein 2012-05-31, 20:24
+
Dmitriy Ryaboy 2012-06-01, 09:02
+
Steve Bernstein 2012-06-01, 17:25
+
Subir S 2012-06-02, 11:04
+
Steve Bernstein 2012-06-03, 16:24
+
Jagat 2012-06-03, 18:08
+
Subir S 2012-06-05, 12:53
+
Dmitriy Ryaboy 2012-06-06, 02:33
+
Jagat 2012-06-06, 07:41
Copy link to this message
-
RE: this nested foreach worked in 0.8.1, no longer works in 0.10
Meanwhile, I'm moving forward running this script on 0.8.1 with no issues.  Probably going to back off on using 0.10 for now and wait for a more stable release.

-----Original Message-----
From: Steve Bernstein [mailto:[EMAIL PROTECTED]]
Sent: Sunday, June 03, 2012 9:25 AM
To: [EMAIL PROTECTED]
Subject: RE: this nested foreach worked in 0.8.1, no longer works in 0.10

Since this seems to do with project, before I wrote to the list, I'd already tried actionBag.sent and actionBagGrouped::actionBag.sent.  No joy.  Is this a bug?  Seems like others would have stumbled across it already.
SB
________________________________________
From: Subir S [[EMAIL PROTECTED]]
Sent: Saturday, June 02, 2012 4:04 AM
To: [EMAIL PROTECTED]
Subject: Re: this nested foreach worked in 0.8.1, no longer works in 0.10

Can you try  sent = FILTER actionBag BY  actionBag.action=='sent';

Although not sure why it does not work. I also use pig 0.8.1 and similar constructs work for me.

On Fri, Jun 1, 2012 at 10:55 PM, Steve Bernstein
<[EMAIL PROTECTED]>wrote:

> No, all those relations embedded in the nested foreach are unique to
> it, not used elsewhere.
> SB
>
> -----Original Message-----
> From: Dmitriy Ryaboy [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 01, 2012 2:03 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: this nested foreach worked in 0.8.1, no longer works in
> 0.10
>
> Do you have relations ned sent, opened, etc, elsewhere in the script?
>
> On May 31, 2012, at 12:09 PM, Steve Bernstein
> <[EMAIL PROTECTED]>
> wrote:
>
> > We upgraded from Pig 0.8.1 to 0.10 and the following nested foreach
> > no
> longer works:
> >
> > actionBagGrouped = GROUP actionBag BY (deal_id,month); dealCounts =
> > FOREACH actionBagGrouped {
> >                sent = FILTER actionBag BY action=='sent';
> >                opened = FILTER actionBag BY action=='opened';
> >                clicked = FILTER actionBag BY action=='clicked';
> >                purchased = FILTER actionBag BY action=='purchased';
> >
> >                GENERATE
> >                                FLATTEN(group),
> >                                COUNT(sent) AS sentCount,
> >                                COUNT(opened) AS openedCount,
> >                                COUNT(clicked) AS clickedCount,
> >                                COUNT(purchased) AS purchasedCount;
> > }; I get:
> > "Invalid scalar projection: action : A column needs to be projected
> > from
> a relation for it to be used as a scalar"
> > Banging my head against a wall-the problem is with the nest op sent
> > > Filter...
> >
> > Help!
> > Thanks-
> > Steve
>
+
Dmitriy Ryaboy 2012-06-06, 18:55
+
Steve Bernstein 2012-06-07, 17:35
+
Dmitriy Ryaboy 2012-06-07, 23:06