Grokbase Groups Hive user March 2011
You can probably do this in Bash now, try something like this:

zz=`hive -S -e "select count(1) from t"`


~ Avram Aelony|Sr. Analyst||(424) 258-1199|x1098|skype: avram.aelony ~
On Mar 21, 2011, at 3:55 PM, Sameer Kalburgi wrote:

Any plans, if possible, to allow you to set the variable from a query result e.g. 'set zzz = (select count(1) from t)'?

On Mon, Mar 21, 2011 at 5:20 PM, Edward Capriolo wrote:
On Mon, Mar 21, 2011 at 11:43 AM, Andrew Wilson wrote:
We use the Cloudera Oozie distro which has a Hive action, and provides that kind of template support for Hive scripts.
On Mar 21, 2011, at 11:35 AM, Lenin Gali wrote:

Best way to do this is to write shell or python scripts and echo with substitute variables and call hive from command line passing -f argument with output file.

Sent from my BlackBerry® wireless handheld

-----Original Message-----
From: amit jaiswal <>
Date: Mon, 21 Mar 2011 08:10:55
To: <>
Subject: Dynamic Configuration support in Hive SQL


Does hive support dynamic configuration? For example: is it possible to write a
hive script with some ${PARAM} variables and let hive replace these parameters
with their values at runtime.

Original hive script:
select * from person where age > ${MIN_AGE};

Config file:

And hive replaces the MIN_AGE parameter automatically.

Hive 0.7.0 will support variables substitution.
This is the xdoc
(you can built the doc into nicer html by running ant docs in trunk)

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 6 | next ›
Discussion Overview
groupuser @
categorieshive, hadoop
postedMar 21, '11 at 3:11p
activeMar 21, '11 at 11:28p



site design / logo © 2021 Grokbase