Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B661D1017F for ; Thu, 15 Aug 2013 05:31:57 +0000 (UTC) Received: (qmail 48913 invoked by uid 500); 15 Aug 2013 05:31:54 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 48615 invoked by uid 500); 15 Aug 2013 05:31:53 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 48578 invoked by uid 500); 15 Aug 2013 05:31:52 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 48563 invoked by uid 99); 15 Aug 2013 05:31:51 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Aug 2013 05:31:51 +0000 Date: Thu, 15 Aug 2013 05:31:51 +0000 (UTC) From: "Xuefu Zhang (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-4568) Beeline needs to support resolving variables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-4568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xuefu Zhang updated HIVE-4568: ------------------------------ Fix Version/s: 0.12.0 Status: Patch Available (was: Open) > Beeline needs to support resolving variables > -------------------------------------------- > > Key: HIVE-4568 > URL: https://issues.apache.org/jira/browse/HIVE-4568 > Project: Hive > Issue Type: Improvement > Affects Versions: 0.10.0 > Reporter: Xuefu Zhang > Assignee: Xuefu Zhang > Priority: Minor > Fix For: 0.12.0 > > Attachments: HIVE-4568-1.patch, HIVE-4568.patch > > > Previous Hive CLI allows user to specify hive variables at the command line using option "--hivevar". In user's script, reference to a hive variable will be substituted with the value of the variable. In such way, user can parameterize his/her script and invoke the script with different hive variable values. The following script is one usage: > {code} > hive --hivevar > INPUT=/user/jenkins/oozie.1371538916178/examples/input-data/table > --hivevar > OUTPUT=/user/jenkins/oozie.1371538916178/examples/output-data/hive > -f script.q > {code} > script.q makes use of hive variables: > {code} > CREATE EXTERNAL TABLE test (a INT) STORED AS TEXTFILE LOCATION '${INPUT}'; > INSERT OVERWRITE DIRECTORY '${OUTPUT}' SELECT * FROM test; > {code} > However, after upgrade to hiveserver2 and beeline, this functionality is missing. Beeline doesn't take --hivevar option, and any hive variable isn't passed to server so it cannot be used for substitution. > This JIRA is to address this issue, providing a backward compatible behavior at Beeline. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira