Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 71D3D107F4 for ; Thu, 4 Jul 2013 16:10:40 +0000 (UTC) Received: (qmail 4081 invoked by uid 500); 4 Jul 2013 16:10:37 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 4033 invoked by uid 500); 4 Jul 2013 16:10:37 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 4017 invoked by uid 99); 4 Jul 2013 16:10:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jul 2013 16:10:35 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of edlinuxguru@gmail.com designates 209.85.212.174 as permitted sender) Received: from [209.85.212.174] (HELO mail-wi0-f174.google.com) (209.85.212.174) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jul 2013 16:10:30 +0000 Received: by mail-wi0-f174.google.com with SMTP id k10so6477423wiv.7 for ; Thu, 04 Jul 2013 09:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=MuU7J6sI5OmCT6iY1UPvp9L6CtGdMLpDUKKvnm29Q40=; b=TPU3rop5DRFe0BgbAvFWtrm0CZAAgbPRAzkxs8r9yYH/rtQAW+YoTDkPbODhQM7dZI B0/UeJJJyne33X7PEwwkmfDryn0WiNWFAkMQyOgYpevWyrToNpTNutW2A0YddGJSKXiL 5ECJ2abo5vEZELLUJ4YbjjWpnqTV+eMhbXUTYHHJlBibiC4u0mDhzU+Jg7gpReFsJNhK e+kQOJ8qKgfbtkbVuaxRDnCm4QyEGcDtqKgMvVDkuX3IkPffFP6fOCzDqUCf1q8po7Hq sBbl/3ccUHjL6C+fqb/n0sfHzlhRPvsEYHWuCSf1LvzAkJG3+HHuy4GE3znjI8VzGH0Y 6QQQ== MIME-Version: 1.0 X-Received: by 10.180.89.231 with SMTP id br7mr21647433wib.19.1372954209895; Thu, 04 Jul 2013 09:10:09 -0700 (PDT) Received: by 10.195.12.115 with HTTP; Thu, 4 Jul 2013 09:10:09 -0700 (PDT) In-Reply-To: References: Date: Thu, 4 Jul 2013 12:10:09 -0400 Message-ID: Subject: Re: How Can I store the Hive query result in one file ? From: Edward Capriolo To: "user@hive.apache.org" Content-Type: multipart/alternative; boundary=e89a8f3ba255f94cbb04e0b1cf07 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f3ba255f94cbb04e0b1cf07 Content-Type: text/plain; charset=ISO-8859-1 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 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 > --e89a8f3ba255f94cbb04e0b1cf07 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Normally if use set mapred.reduce.tasks=3D1 you get o= ne output file. You can also look at
hive.= merge.mapfiles, mapred.reduce.tasks, hive.merge.reduce= files also you can use a separate tool https://github.com/edwardcapriolo/filecrush


O= n Thu, Jul 4, 2013 at 6:38 AM, Nitin Pawar <nitinpawar432@gmail.com<= /a>> wrote:
will hive -e "query&qu= ot; > filename =A0or hive -f query.q > filename will do ?=A0

=
you specially want it to write into a named file on hdfs only?=A0


On Thu, Jul 4, 2013 at 3:12 PM, Matouk I= FTISSEN <matouk.iftissen@ysance.com> wrote:
Hello Hive users,
Is there a manner to = store the Hive=A0 query result (SELECT *.....) in a specfique and alone fi= le (given the file name) like (INSERT OVERWRITE LOCAL DIRECTORY '/direc= tory_path_name/')?
Thanks for your answers




--
Nitin Pawar

--e89a8f3ba255f94cbb04e0b1cf07--