Pig question,
I have my data setup the 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 I want to do is Group by function,group and home and then rank within that 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 does not allow me to RANK within group.Any suggestions? Jython UDF ?