hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devopam Mittra <>
Subject Re: Storing the Hive Query Results into Variable
Date Mon, 07 Dec 2015 04:17:11 GMT
There are multiple ways of doing it. It will depend on your method of
implementation as well. i.e. what is the platform you are using to fire the
hive queries.

Pig can do that for you (as already confirmed by another user)
Shell scripts (unix based implementation) also supports it.
A very crude yet effective way : hive -e 'select *from table' >

You may want to check out the Hive CLI features available and then pick
what suits your need best:

2. primer:

Hope this helps you to move forward


On Fri, Dec 4, 2015 at 5:48 AM, mahender bigdata <> wrote:

> Hi,
> Is there option available to store hive results into variable like
> select @i= count(*) from HiveTable.
> or
> Storing Table Results into variable and make use of it later stage of
> Query. I tired using HQL CTE but the scope of CTE is limited to next select
> only, Is there a way to intermediate results like join data into variable
> and make use of it latter stage.
> Thanks,
> Mahender

Devopam Mittra
Life and Relations are not binary

View raw message