hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 丁桂涛(桂花) <dinggui...@baixing.com>
Subject Re: possible to pass in a list of values as param ?
Date Tue, 28 Oct 2014 01:57:49 GMT
Hi Yang,

try:

hive -hiveconf myargs="1','2','3','4"

SELECT * from mytable where my_id in ('${hiveconf:myargs}');


On Tue, Oct 28, 2014 at 5:57 AM, Yang <teddyyyy123@gmail.com> wrote:

> I have a query that does something like
>
>
> SELECT * from mytable where my_id in ('1', '2', '3', '4' );
>
>
> now instead of hard coding the value list in the (), I'd like to pass it
> in as a param
>
> I tried "in (${hiveconf:myargs}) "
>
> and hive -hiveconf myargs="'1','2','3','4'"
> or ='1,2,3,4'
>
> neither seems to work
>
>
> what is the best way to do this?
>
> thanks!
> yang
>

Mime
View raw message