hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bertrand Dechoux <decho...@gmail.com>
Subject Re: How Can I store the Hive query result in one file ?
Date Thu, 04 Jul 2013 11:09:17 GMT
The question is what is the volume of your output. There is one file per
output task (map or reduce) because that way each can write it
independently and in parallel. That's how mapreduce work. And except by
forcing the number of tasks to 1, there is no certain way to have one
output file.

But indeed if the volume is low enough, you could also capture the standard
output into a local file like Nitin described.

Bertrand


On Thu, Jul 4, 2013 at 12:38 PM, Nitin Pawar <nitinpawar432@gmail.com>wrote:

> will hive -e "query" > filename  or hive -f query.q > filename will do ?
>
> you specially want it to write into a named file on hdfs only?
>
>
> On Thu, Jul 4, 2013 at 3:12 PM, Matouk IFTISSEN <
> matouk.iftissen@ysance.com> wrote:
>
>> Hello Hive users,
>> Is there a manner to store the Hive  query result (SELECT *.....) in a
>> specfique and alone file (given the file name) like (INSERT OVERWRITE LOCAL
>> DIRECTORY '/directory_path_name/')?
>> Thanks for your answers
>>
>>
>
>
> --
> Nitin Pawar
>



-- 
Bertrand Dechoux

Mime
View raw message