Thanks Dmitriy, I didn't know you could do that!
I added an entry to the FAQ that Daniel pointed out: http://bit.ly/sZ8UOL
On 11/10/11 6:25 PM, "Dmitriy Ryaboy" <[EMAIL PROTECTED]> wrote:
>Wait, a cross? No, don't do a cross. You can just cast the result of
>all as a scalar, this will be much more efficient.
>On Wed, Nov 9, 2011 at 6:32 PM, Doug Daniels
>> I was just working on a pig script to group some data by a field and
>> generate percentages for each group. Without windowing functions at my
>> disposal, I wound up using a group by on the field for the numerator, a
>> group all for the denominator, and a cross to pull them together.
>> Afterward, I found myself wanting to drop that snippet somewhere that
>> other folks could use it, or (even better) to have found a snippet in
>> first place and not had to write it!
>> So I was thinking it'd be great to have a "pig cookbook" online with
>> common operations that people do with pig. Does anything like that
>> yet? If not, where would be a good place for it?