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

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


Copy link to this message
-
RE: this nested foreach worked in 0.8.1, no longer works in 0.10
Yes, it's:
actionBagGrouped: {group: (deal_id: chararray,month: chararray),actionBag: {userID: chararray,month: chararray,deal_id: chararray,action: chararray}}

_____________
Steve Bernstein
VP, Analytics
Rearden Commerce, Inc.

+1.408.499.0961 Mobile

deem.com | reardencommerce.com
-----Original Message-----
From: Jonathan Coveney [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 31, 2012 1:09 PM
To: [EMAIL PROTECTED]
Subject: Re: this nested foreach worked in 0.8.1, no longer works in 0.10

Can you "describe actionBagGrouped" and paste it?

2012/5/31 Steve Bernstein <[EMAIL PROTECTED]>

> 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
>