RE:

2012-01-11 Thread Steven Wong
Try fetchOne or fetchN. From: Lu, Wei [mailto:w...@microstrategy.com] Sent: Tuesday, January 10, 2012 11:14 PM To: Lu, Wei; user@hive.apache.org Subject: RE: BTW, I am using hive 0.7 From: Lu, Wei Sent: Wednesday, January 11, 2012 3:13 PM To: 'user@hive.apache.org' Subject: Hi, I am using Thri

update RE: hive map field question

2012-01-11 Thread Chalcy Raja
Hi Hive users, I thought I'll update the status on this. I could spend some time on cracking hive code, map field related in particular, 1. Explode works great and it solves a very needed problem for me. 2. There is already a str_to_map udf available in cdh3u2. I stumbled upon this while

Does anyone know if io.seqfile.compress.blocksize does anything?

2012-01-11 Thread Edward Capriolo
Hadoop 0.20.2 Hive 0.7.X I got convinced that installing google-snappy would be awesome, so I spent the day it took to build and patch snappy in. I actually found that I did not get good compression from snappy 30% smaller vs 50% from gzip. That is another story. I decided to start playing with:

Re: Lag & Lead

2012-01-11 Thread Mark Grover
Dave, I had a similar need for the "first" function but since the Hive ticket Ed mentioned is still unresolved, I ended up writing a reducer (pluggable into Hive via the "transform" functionality) that returned the first row. In your example, you would "distribute by" the cookie before you send

Re: Lag & Lead

2012-01-11 Thread Edward Capriolo
See this for discussion. https://issues.apache.org/jira/browse/HIVE-896 On Wed, Jan 11, 2012 at 9:54 AM, Dave Houston wrote: > Hi guys, > > trying to calculate the dwell time of pages in a weblog. In oracle we > would used the lead analytic function to find the next row for a particular > cooki

Re: Date,table name as config parameter from command prompt in Hive queries

2012-01-11 Thread Bejoy Ks
Hi Praveen     It is not a hive issue, a minor shell script issue. You are passing the string value "TABLE_NAME1" to .hql where as you intended to pass the value of variable TABLE_NAME1 to .hql . For that include a $ sign in front of variable names like hive -f hive_query.hql -hiveconf tab_

Lag & Lead

2012-01-11 Thread Dave Houston
Hi guys, trying to calculate the dwell time of pages in a weblog. In oracle we would used the lead analytic function to find the next row for a particular cookie. What is the best approach for Hive? Thanks Dave Dave Houston r...@crankyadmin.net

Re: Date,table name as config parameter from command prompt in Hive queries

2012-01-11 Thread Praveen Kumar
I found one way of doing it but, failing in that. hive_query.hql -- use db_name; select * from ( select * from '${hiveconf:tab_name1}' union all select * from '${hiveconf: tab_name2}') t1 where sdate > '${hiveconf: curr_date1}' and edate < '${hiveconf: curr_date2}'; hive_tri.sh --

Date,table name as config parameter from command prompt in Hive queries

2012-01-11 Thread Praveen Kumar
Hello, I want to run hive queries through a .hql file in command prompt where i need to pass start_date,end_date & table_name as command line parameter How can I achieve this? Please help -- Regards, Praveen