Re: Hive Row number Use case

2018-07-18 Thread Brad Kaneyama
As you noticed your partition by clause is improper since your row_number() counts all of the members that are the same -- instead of sequencing a run of the same values. Here's a POC using a simplified version of your dataset: You can adjust the grouping windows and change detection accordingly.

Re: Hive Row number Use case

2018-07-17 Thread Anup Tiwari
Can someone look into this and revert if possible? Regards, Anup Tiwari On Sat, Jul 14, 2018 at 12:28 AM, Anup Tiwari wrote: > Hi All, > > Can someone look into this and revert if possible? > > Thanks. > > > On Thu, 12 Jul 2018 12:56 Anup Tiwari, wrote: > >> Hi All, >> >> We have a use case w

Re: Hive Row number Use case

2018-07-13 Thread Anup Tiwari
Hi All, Can someone look into this and revert if possible? Thanks. On Thu, 12 Jul 2018 12:56 Anup Tiwari, wrote: > Hi All, > > We have a use case where we want to assign a row number to a table based > on 3 column ( uid, update_date, flag) i.e. if value of any of the column > gets changed, we

Hive Row number Use case

2018-07-12 Thread Anup Tiwari
Hi All, We have a use case where we want to assign a row number to a table based on 3 column ( uid, update_date, flag) i.e. if value of any of the column gets changed, we want to reset this number. Please find below sample input data and expected output data. Also please note that we have tried r

Re: Hive Row number

2012-12-18 Thread maya bhardwaj
Hi Shrikanth, Hope you are doing great. Though i created Rank UDF in hive. Create Temporary Function my_rank as 'com.m6d.hiveudf.com' but when i using this function in my query i am getting error Invalid function my_rank and i can see my function in hive. Do you have any suggestions. Thanks May

Re: Hive Row number

2012-12-14 Thread maya bhardwaj
Thanks ShriKanth. On Fri, Dec 14, 2012 at 11:22 AM, shrikanth shankar wrote: > See > http://www.edwardcapriolo.com/roller/edwardcapriolo/entry/doing_rank_with_hive > > thanks, > Shrikanth > > On Dec 14, 2012, at 8:18 AM, maya bhardwaj wrote: > > I am converting the Netezza query in hive.How can

Re: Hive Row number

2012-12-14 Thread shrikanth shankar
See http://www.edwardcapriolo.com/roller/edwardcapriolo/entry/doing_rank_with_hive thanks, Shrikanth On Dec 14, 2012, at 8:18 AM, maya bhardwaj wrote: > I am converting the Netezza query in hive.How can i achieve following query > in hive --> row_number() over (partition by record_id, event_id