You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by jinhang du <du...@gmail.com> on 2011/06/14 13:45:32 UTC

how to save the output information of hive console client to a file?

Hi all,

I want record the output of every commends executed on hive console client.
How to do it ?

Thanks.

-- 
dujinhang

Re: how to save the output information of hive console client to a file?

Posted by jinhang du <du...@gmail.com>.
Thanks.

2011/6/15 Shouguo Li <th...@gmail.com>

> you can save the output to a directory, for later use. like this:
> INSERT OVERWRITE LOCAL DIRECTORY '/tmp/hive_query_dump/'
> SELECT * FROM table1;
>
> more details here: http://wiki.apache.org/hadoop/Hive/LanguageManual/DML
> (scroll to the end of the page)
>
> if you need to do more complicated processing after you get the output from
> hive, maybe you want to run queries from some scripts (like python) via hive
> server. here are some docs about that:
> http://wiki.apache.org/hadoop/Hive/HiveServer
> http://wiki.apache.org/hadoop/Hive/HiveClient
>
> hope that helps.
> good luck!
>
>
> On Tue, Jun 14, 2011 at 4:45 AM, jinhang du <du...@gmail.com> wrote:
>
>> Hi all,
>>
>> I want record the output of every commends executed on hive console
>> client.
>> How to do it ?
>>
>> Thanks.
>>
>> --
>> dujinhang
>>
>
>


-- 
dujinhang

Re: how to save the output information of hive console client to a file?

Posted by Shouguo Li <th...@gmail.com>.
you can save the output to a directory, for later use. like this:
INSERT OVERWRITE LOCAL DIRECTORY '/tmp/hive_query_dump/'
SELECT * FROM table1;

more details here: http://wiki.apache.org/hadoop/Hive/LanguageManual/DML
(scroll to the end of the page)

if you need to do more complicated processing after you get the output from
hive, maybe you want to run queries from some scripts (like python) via hive
server. here are some docs about that:
http://wiki.apache.org/hadoop/Hive/HiveServer
http://wiki.apache.org/hadoop/Hive/HiveClient

hope that helps.
good luck!

On Tue, Jun 14, 2011 at 4:45 AM, jinhang du <du...@gmail.com> wrote:

> Hi all,
>
> I want record the output of every commends executed on hive console client.
> How to do it ?
>
> Thanks.
>
> --
> dujinhang
>