How Can I store the Hive query result in one file ?

2013-07-04 Thread Matouk IFTISSEN
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

Re: How Can I store the Hive query result in one file ?

2013-07-04 Thread Nitin Pawar
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.iftis...@ysance.comwrote: Hello Hive users, Is there a manner to store the Hive query result (SELECT

Re: How Can I store the Hive query result in one file ?

2013-07-04 Thread Bertrand Dechoux
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

Re: How Can I store the Hive query result in one file ?

2013-07-04 Thread Michael Malak
Dechoux decho...@gmail.com To: user@hive.apache.org Sent: Thursday, July 4, 2013 7:09 AM Subject: Re: How Can I store the Hive query result in one file ? 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

Re: How Can I store the Hive query result in one file ?

2013-07-04 Thread Matouk IFTISSEN
CREATE TABLE MYTABLE AS SELECT ... and then copy the resulting HDFS files directly out of /user/hive/warehouse. *From:* Bertrand Dechoux decho...@gmail.com *To:* user@hive.apache.org *Sent:* Thursday, July 4, 2013 7:09 AM *Subject:* Re: How Can I store the Hive query result in one file

Re: How Can I store the Hive query result in one file ?

2013-07-04 Thread Nitin Pawar
7:09 AM *Subject:* Re: How Can I store the Hive query result in one file ? 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

Re: How Can I store the Hive query result in one file ?

2013-07-04 Thread Edward Capriolo
Normally if use set mapred.reduce.tasks=1 you get one output file. You can also look at *hive*.*merge*.*mapfiles*, mapred.reduce.tasks, hive.merge.reducefiles also you can use a separate tool https://github.com/edwardcapriolo/filecrush On Thu, Jul 4, 2013 at 6:38 AM, Nitin Pawar

Re: How Can I store the Hive query result in one file ?

2013-07-04 Thread Raj Hadoop
Sent: Friday, July 5, 2013 12:10 AM Subject: Re: How Can I store the Hive query result in one file ? Normally if use set mapred.reduce.tasks=1 you get one output file. You can also look at hive.merge.mapfiles, mapred.reduce.tasks, hive.merge.reducefiles also you can use a separate tool https

Re: How Can I store the Hive query result in one file ?

2013-07-04 Thread Raj Hadoop
...@ysance.com Sent: Friday, July 5, 2013 12:17 AM Subject: Re: How Can I store the Hive query result in one file ?    hive set hive.io.output.fileformat=CSVTextFile;  hive insert overwrite local directory '/usr/home/hadoop/da1/' select * from customers *** customers is a Hive table