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 0359A11403 for ; Mon, 16 Jun 2014 18:58:37 +0000 (UTC) Received: (qmail 36896 invoked by uid 500); 16 Jun 2014 18:58:35 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 36829 invoked by uid 500); 16 Jun 2014 18:58:35 -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 36819 invoked by uid 99); 16 Jun 2014 18:58:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jun 2014 18:58: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 zhou.jinyuan@gmail.com designates 209.85.214.170 as permitted sender) Received: from [209.85.214.170] (HELO mail-ob0-f170.google.com) (209.85.214.170) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jun 2014 18:58:32 +0000 Received: by mail-ob0-f170.google.com with SMTP id uz6so6192077obc.15 for ; Mon, 16 Jun 2014 11:58:08 -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=F8PnYQmyzDsyaKIwNNxOn9MW97zXLYxMnd0niOT/24c=; b=qbD0x5Qp3joCqZq/OBQOCS7m3GVn+WF/YNa1DAKbDU+uTlA8wTPdbFsH0UHgJtkff2 r3E+ObUJnGmkiXEHSyXV2Z8eg7YBZYH/8JHvX7yLdqDecD4+K64Vv6BRtNcr+Md3Agzc ecJSqAMjdX1yMywvERQI3k+7HtJ7WcGwxtCx1i6zhAL2i5hXcyUGGAP/jXQzXQWXH9eA 2EhDSAAo9RiHLf4dNfYhC5yak6SvfL5/myTlw9IQvJkQalEeqBQKy0RMEydmk19Oujr9 tNLsOu23cBZrB15TDsBcqrCVb7HweDax+qudtQAeoywZ9+nyFXsRlzC3psUAuWy1rozh YliQ== MIME-Version: 1.0 X-Received: by 10.60.179.80 with SMTP id de16mr4205124oec.69.1402945088387; Mon, 16 Jun 2014 11:58:08 -0700 (PDT) Received: by 10.182.202.5 with HTTP; Mon, 16 Jun 2014 11:58:08 -0700 (PDT) In-Reply-To: References: Date: Mon, 16 Jun 2014 11:58:08 -0700 Message-ID: Subject: Re: hive cli configuration quesiton From: Jinyuan Zhou To: user@hive.apache.org Content-Type: multipart/alternative; boundary=089e0118243aa25cfd04fbf89bff X-Virus-Checked: Checked by ClamAV on apache.org --089e0118243aa25cfd04fbf89bff Content-Type: text/plain; charset=UTF-8 Thanks Douglas, This should solve my problem. Regards Jinyuan (Jack) Zhou On Mon, Jun 16, 2014 at 11:55 AM, Douglas Moore < douglas.moore@thinkbiganalytics.com> wrote: > Hive CLI has a -i option. We create a pre.sql file with hive > settings and then specify: > hive -i pre.hql -f query.hql > > > > On Mon, Jun 16, 2014 at 2:52 PM, Jinyuan Zhou > wrote: > >> Hi, >> I like to include common settings in one place when I run different hql >> script via hive cli. >> My setting is really script specific, with my understanding of hive, >> hadoop, it is not very appropriate to put these settings in >> hive-site.xml, or hadoop configruation files. I don't want to repeat these >> settings in every hql script either. I know pig has a mechinizsm to >> importing pig script into another script. Is there similar mechnism for >> hive? >> Thanks, >> >> -- >> -- Jinyuan (Jack) Zhou >> > --089e0118243aa25cfd04fbf89bff Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thanks Douglas,
This should solve my problem.
Regards

Jinyuan (Jack) Zhou


On Mon, Jun 16, 2014 at 11:55 AM, Dougla= s Moore <douglas.moore@thinkbiganalytics.com> wrote:
Hive CLI has a -i <file&= gt; option. We create a pre.sql file with hive settings and then specify: hive -i pre.hql -f query.hql



On Mon, Jun 16, 2014 at 2:52 PM, Jinyuan Zho= u <zhou.jinyuan@gmail.com> wrote:
Hi,=C2=A0
I like to inc= lude common settings in one place when I run different hql script via hive = cli.
My setting is really script specific, with my understanding of hive, h= adoop, =C2=A0it is not very appropriate to put =C2=A0these settings in hive= -site.xml, or hadoop configruation files. I don't want to repeat these = settings in every hql script either. I know pig has a mechinizsm to importi= ng pig script into another script. Is there similar mechnism for hive?
Thanks,

--
= -- Jinyuan (Jack) Zhou

--089e0118243aa25cfd04fbf89bff--