Reply
Highlighted
New Contributor
Posts: 1
Registered: ‎02-05-2018

Partition by clause with multiple columns not working in impala but works in hive

Hi,

 

I am trying to run the below query in impala but it does not work.any help is appreciated.

 

select mcc,cust,acc,alertType,amt,transactionday,
ROW_NUMBER() OVER(PARTITION BY (cust,acc,alertType) ORDER BY transactionday) as seq_no
from default.summary;

 

Is there a alternate way or work around for this in impala, i need to badly make it work in impala.

 

But when i run below query with partition by as only one column in impala it works.

 

select mcc,cust,acc,alertType,amt,transactionday,
ROW_NUMBER() OVER(PARTITION BY (cust) ORDER BY transactionday) as seq_no
from default.summary;

 

Announcements