Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> Passing date as command line arguments


+
Techy Teck 2012-08-03, 22:48
+
Matt Tucker 2012-08-04, 02:15
+
Techy Teck 2012-08-04, 06:06
Copy link to this message
-
Re: Passing date as command line arguments
There can't be a space in the variable name. Try this: ${hiveconf:start_date}

On Fri, Aug 3, 2012 at 11:06 PM, Techy Teck <[EMAIL PROTECTED]> wrote:
> Can anyone help me out on this?
>
> I am stuck on this and I have no clue what wrong I am doing?
>
>
>
>
> On Fri, Aug 3, 2012 at 3:48 PM, Techy Teck <[EMAIL PROTECTED]> 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
>>
>>
>
+
Techy Teck 2012-08-04, 06:41
+
Bejoy Ks 2012-08-04, 06:52
+
Techy Teck 2012-08-04, 06:58
+
Techy Teck 2012-08-04, 07:07
+
Bejoy KS 2012-08-04, 07:16
+
Techy Teck 2012-08-04, 07:21
+
Bejoy KS 2012-08-04, 07:24
+
Bejoy KS 2012-08-04, 07:27
+
Techy Teck 2012-08-04, 07:29
+
Techy Teck 2012-08-04, 07:26
+
Bejoy KS 2012-08-04, 07:29
+
Techy Teck 2012-08-04, 07:30
+
Techy Teck 2012-08-04, 07:35
+
Bejoy KS 2012-08-04, 07:39
+
Lefty Leverenz 2012-08-04, 07:58
+
Edward Capriolo 2012-08-04, 14:19
+
Bejoy KS 2012-08-04, 07:35
+
Techy Teck 2012-08-04, 07:37
+
Techy Teck 2012-08-04, 06:01