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 7D18E47A1 for ; Wed, 15 Jun 2011 04:13:27 +0000 (UTC) Received: (qmail 6818 invoked by uid 500); 15 Jun 2011 04:13:26 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 6784 invoked by uid 500); 15 Jun 2011 04:13:26 -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 6774 invoked by uid 99); 15 Jun 2011 04:13:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2011 04:13:25 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of the1plummie@gmail.com designates 209.85.220.176 as permitted sender) Received: from [209.85.220.176] (HELO mail-vx0-f176.google.com) (209.85.220.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Jun 2011 04:13:17 +0000 Received: by vxa37 with SMTP id 37so27022vxa.35 for ; Tue, 14 Jun 2011 21:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=SvyDZsGYo7F71+BUvRQM7reJhnJp8IIsgntRbSF20j8=; b=mEcqndf+8le2GK2UL1Wbj3X6Ee/hsXF9/KV24zVvlcar99VnTW0HBCPw+1uT3E6GOe I9vHPKR65qPlg6bnJEAKd88azEO/FwlCbQzFmPvZrTbJtAPEw4Mo6Nx9xndbkrjgy6Bi vWdTXhyvVj1mpktqEtwrplL9Aa7+T/jHNcSU0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=SmyVQvZlsOLbdfZhhryInnDcUx+IykP8KI4MMI2+ckE5tzAadzpM1JzNTBEk/1WMex a7qkOyQ6OVyXNnOl5ayE/TEYfVIkYIxeXcButt6drGr45xf+FSilMVWnOAU/QpgdqzJj xUBjg1TGSjN6b3RZnwco8vKdVI9dz5Yl5MKiU= MIME-Version: 1.0 Received: by 10.52.178.195 with SMTP id da3mr26811vdc.179.1308111176955; Tue, 14 Jun 2011 21:12:56 -0700 (PDT) Received: by 10.52.162.104 with HTTP; Tue, 14 Jun 2011 21:12:56 -0700 (PDT) In-Reply-To: References: Date: Tue, 14 Jun 2011 21:12:56 -0700 Message-ID: Subject: Re: how to save the output information of hive console client to a file? From: Shouguo Li To: user@hive.apache.org Content-Type: multipart/alternative; boundary=bcaec51a7d5a07772504a5b85e1e X-Virus-Checked: Checked by ClamAV on apache.org --bcaec51a7d5a07772504a5b85e1e Content-Type: text/plain; charset=ISO-8859-1 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 wrote: > Hi all, > > I want record the output of every commends executed on hive console client. > How to do it ? > > Thanks. > > -- > dujinhang > --bcaec51a7d5a07772504a5b85e1e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 p= rocessing 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.apach= e.org/hadoop/Hive/HiveServer
http://wiki.apache.org/hadoop/Hive/HiveClient
hope that helps.
good luck!

On Tue, Jun 14, 2011 at 4:45 A= M, jinhang du <= dujinhang@gmail.com> wrote:

--
dujinhang

--bcaec51a7d5a07772504a5b85e1e--