hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Techy Teck <comptechge...@gmail.com>
Subject Re: Passing date as command line arguments
Date Sat, 04 Aug 2012 06:01:22 GMT
I tried that. But it's not working for me. I didn't got any result.

Any other suggestion?


On Fri, Aug 3, 2012 at 7:41 PM, Matt Tucker <matthewtckr@gmail.com> wrote:

> Yes, that should do the trick for you.
>
>
>
> On Aug 3, 2012, at 10:17 PM, Techy Teck <comptechgeeky@gmail.com> wrote:
>
> So you are saying, I should invoke like this below?
>
> * hive -f hivetest1.hql -hiveconf start_date="20120709"*
> *
> *
> *
> *
>
>
>
> On Fri, Aug 3, 2012 at 7:15 PM, Matt Tucker <matthewtckr@gmail.com> wrote:
>
>> Hi,
>>
>> In the command line, you want to wrap 20120709 in double-quotes, as they
>> get stripped when being passed into the hiveconf variable.
>>
>> Matt
>>
>>
>>
>> On Aug 3, 2012, at 6:48 PM, Techy Teck <comptechgeeky@gmail.com> wrote:
>>
>> I have my below query in *test1.hql file. *I am trying to pass the date *
>> (dt)* as the command line argument.
>>
>>
>> *select * from lip_data_quality where dt = '${hiveconf: start_date}';*
>>
>>
>> So whenever I try to run the above *test1.hql file like this-*
>> *
>> *
>> * hive -f hivetest1.hql -hiveconf start_date=20120709*
>> *
>> *
>> I get zero records back. But the data is there in that table for that
>> date. Why is it so? Something wrong I am doing?
>>
>> Can anyone help me out here? I was following Bejoy's Article here
>> http://kickstarthadoop.blogspot.com/2011/10/include-values-during-execution-time-in.html
>>
>>
>>
>

Mime
View raw message