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
Post a Comment