You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by karthik Srivasthava <ka...@gmail.com> on 2014/08/22 17:54:56 UTC
Passing variables using Hiveconf
Hi,
I am passing substitution variable using hiveconf in Hive..
But i couldnt execute simple queries when i am trying to pass more than one
parameter. It throws NoViableAltException - AtomExpression.. Am i missing
something.?
Re: Passing variables using Hiveconf
Posted by karthik Srivasthava <ka...@gmail.com>.
Nithin ,
It worked when i set hive.variable.substitute=true; every time i run this
query.. thanks buddy
On Fri, Aug 22, 2014 at 1:08 PM, Nitin Pawar <ni...@gmail.com>
wrote:
> this is one way
>
> hive $HIVEPARAMS -hiveconf target="$var1" -hiveconf
> mapred.child.java.opts="-server -Xmx1200m -Djava.net.preferIPv4Stack=true"
>
> and you need to set this variable
>
> set hive.variable.substitute=true;
>
>
>
> On Fri, Aug 22, 2014 at 9:24 PM, karthik Srivasthava <
> karthiksrivasthava@gmail.com> wrote:
>
>> Hi,
>>
>> I am passing substitution variable using hiveconf in Hive..
>>
>> But i couldnt execute simple queries when i am trying to pass more than
>> one parameter. It throws NoViableAltException - AtomExpression.. Am i
>> missing something.?
>>
>
>
>
> --
> Nitin Pawar
>
Re: Passing variables using Hiveconf
Posted by Nitin Pawar <ni...@gmail.com>.
this is one way
hive $HIVEPARAMS -hiveconf target="$var1" -hiveconf
mapred.child.java.opts="-server -Xmx1200m -Djava.net.preferIPv4Stack=true"
and you need to set this variable
set hive.variable.substitute=true;
On Fri, Aug 22, 2014 at 9:24 PM, karthik Srivasthava <
karthiksrivasthava@gmail.com> wrote:
> Hi,
>
> I am passing substitution variable using hiveconf in Hive..
>
> But i couldnt execute simple queries when i am trying to pass more than
> one parameter. It throws NoViableAltException - AtomExpression.. Am i
> missing something.?
>
--
Nitin Pawar