jython - Rank within Groups in Pig 11 -


pig question,

i have data setup following way.

function    group   home    name rent    mx  1   john rent    mx  1   jake rent    mx  1   pat rent    dg  2   jason rent    dg  6   patrick rent    dg  6   smith rent    dg  6   joe 

what want group function,group , home , rank within group.

function    group   home    name    rank rent    mx  1   john    1 rent    mx  1   jake    2 rent    mx  1   pat 3 rent    dg  6   patrick 1 rent    dg  6   smith   2 rent    dg  6   joe 3 

the rank function in pig not allow me rank within group.any suggestions? jython udf ?

check out enumerate udf in datafu, you. http://datafu.incubator.apache.org/docs/datafu/1.1.0/datafu/pig/bags/enumerate.html


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -