FAQ
Hi All,

I want to do this in Pig.

"row_number() over (partition by col1 order by col2)"

Any suggestions how I can do this? I know I can do group by instead of
partition by and order by in Pig. But is there is any function with which I
can generate row number() or rank() as we can do in SQL?

Thanks for any help and suggestions.

Sonia

Search Discussions

  • Jonathan Coveney at Feb 22, 2011 at 2:53 pm
    If you want row number, you are going to have to write a UDF.

    2011/2/22 sonia gehlot <sonia.gehlot@gmail.com>
    Hi All,

    I want to do this in Pig.

    "row_number() over (partition by col1 order by col2)"

    Any suggestions how I can do this? I know I can do group by instead of
    partition by and order by in Pig. But is there is any function with which I
    can generate row number() or rank() as we can do in SQL?

    Thanks for any help and suggestions.

    Sonia

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categoriespig, hadoop
postedFeb 22, '11 at 6:27a
activeFeb 22, '11 at 2:53p
posts2
users2
websitepig.apache.org

2 users in discussion

Sonia gehlot: 1 post Jonathan Coveney: 1 post

People

Translate

site design / logo © 2021 Grokbase