hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devopam Mittra <devo...@gmail.com>
Subject Re: How to query data by page in Hive?
Date Thu, 05 Feb 2015 09:35:11 GMT
You may want to use a ROW_NUMBER OR RANK / DENSE RANK in the inner query
and then select only a subset of it in the outer query to control
pagination. Based on your need, you may want to order the records as well ..

Alternatively you may want to use CTE(
https://cwiki.apache.org/confluence/display/Hive/Common+Table+Expression)
for selecting the data in one go and then use row number to select as in
previous case.

regards
Devopam

On Thu, Feb 5, 2015 at 1:31 PM, r7raul1984@163.com <r7raul1984@163.com>
wrote:

> Hello,
>          How to query data by page in Hive?
>
> hive> select * from u_data a limit 1,2;
> FAILED: ParseException line 1:31 missing EOF at ',' near '1'
>
> ------------------------------
> r7raul1984@163.com
>



-- 
Devopam Mittra
Life and Relations are not binary

Mime
View raw message