Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

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


Copy link to this message
-
Re: Passing date as command line arguments
Does Hive 0.6 support underscores in variable names?

Just a thought.  The examples I've seen contain letters and dots (".") but
no other characters.

– Lefty
On Sat, Aug 4, 2012 at 12:39 AM, Bejoy KS <[EMAIL PROTECTED]> wrote:

> **
> Yes that is the right issue. Variable substitution is not happening. I
> can't say much here as I haven't tried out this on 0.6 . The code on my
> blog post is based on 0.7 or higher version I guess.
> Regards
> Bejoy KS
>
> Sent from handheld, please excuse typos.
> ------------------------------
> *From: * Techy Teck <[EMAIL PROTECTED]>
> *Date: *Sat, 4 Aug 2012 00:35:20 -0700
> *To: *<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> *ReplyTo: * [EMAIL PROTECTED]
> *Subject: *Re: Passing date as command line arguments
>
> Hi Bejoy,
>
> I found something very strange. When I actually viewed the Hive log file,
> I found something like this- See the thing in red color. Why is it like so?
>
> *SessionStart SESSION_ID="rjamal_201208041433" TIME="1344065620956"*
> *QueryStart QUERY_STRING=" select * from lip_data_quality where dt = '
> ${hiveconf:start_date}'"
> QUERY_ID="rjamal_20120804143333_3719afde-117d-4c6b-a322-0cff6e4b4c5d"
> TIME="1344065629740"*
> *Counters
> plan="{"queryId":"rjamal_20120804143333_3719afde-117d-4c6b-a322-0cff6e4b4c5d","queryType":null,"queryAttributes":{"queryString":"
> select * from lip_data_quality where dt > '${hiveconf:start_date}'"},"queryCounters":"null","stageGraph":{"nodeType":"1","roots":"null","adjacencyList":"]"},"stageList":"]","done":"false","started":"true"}"
> TIME="1344065629743"*
> *QueryEnd QUERY_STRING=" select * from lip_data_quality where dt > '${hiveconf:start_date}'"
> QUERY_ID="rjamal_20120804143333_3719afde-117d-4c6b-a322-0cff6e4b4c5d"
> QUERY_RET_CODE="0" QUERY_NUM_TASKS="0" TIME="1344065629745"*
> *Counters
> plan="{"queryId":"rjamal_20120804143333_3719afde-117d-4c6b-a322-0cff6e4b4c5d","queryType":null,"queryAttributes":{"queryString":"
> select * from lip_data_quality where dt > '${hiveconf:start_date}'"},"queryCounters":"null","stageGraph":{"nodeType":"1","roots":"null","adjacencyList":"]"},"stageList":"]","done":"true","started":"true"}"
> TIME="1344065629745"*
>
> On Sat, Aug 4, 2012 at 12:30 AM, Techy Teck <[EMAIL PROTECTED]>wrote:
>
>> I cannot try that on Higher version of Hive as I am working in a company
>> where they have installed only Hive 0.6 on the Ares cluster.
>>
>> :(
>>
>>
>>
>>
>> On Sat, Aug 4, 2012 at 12:29 AM, Bejoy KS <[EMAIL PROTECTED]> wrote:
>>
>>> **
>>>
>>> Try it on a higher version of hive and let me know if that doesn't work
>>> still. 0.9 should be good.
>>>
>>>
>>> Regards
>>> Bejoy KS
>>>
>>> Sent from handheld, please excuse typos.
>>> ------------------------------
>>> *From: * Techy Teck <[EMAIL PROTECTED]>
>>> *Date: *Sat, 4 Aug 2012 00:26:44 -0700
>>> *To: *<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
>>> *ReplyTo: * [EMAIL PROTECTED]
>>> *Subject: *Re: Passing date as command line arguments
>>>
>>> Yes it is String for me here.
>>>
>>> This is the table structure by the way-
>>>
>>> *create table lip_data_quality*
>>> *( buyer_id bigint,*
>>> *  total_chkout bigint,*
>>> *  total_errpds bigint*
>>> * )*
>>> * partitioned by (dt string)*
>>> *row format delimited fields terminated by '\t'*
>>> *stored as sequencefile*
>>> *location '/apps/hdmi-technology/b_apdpds/lip-data-quality'*
>>> *;*
>>>
>>> in which I am using dt in the where clause in my query. I am running *Hive
>>> 0.6.*
>>>
>>>
>>>
>>> On Sat, Aug 4, 2012 at 12:24 AM, Bejoy KS <[EMAIL PROTECTED]> wrote:
>>>
>>>> **
>>>> I tried the same query on my end, It is working fine for me without any
>>>> issues.
>>>>
>>>> By de way the data type for 'dt' is String itself right?
>>>> Regards
>>>> Bejoy KS
>>>>
>>>> Sent from handheld, please excuse typos.
>>>> ------------------------------
>>>> *From: * Techy Teck <[EMAIL PROTECTED]>
>>>> *Date: *Sat, 4 Aug 2012 00:21:37 -0700
>>>> *To: *<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB