Re: Hive Join with distinct rows

2012-11-09 Thread Praveen Kumar K J V S
ct col1, col2 tuple hive> SELECT DISTINCT(col1), col2 FROM t1; 1 (3 or 4) 2 5 Does anyone think on the same line and suggest Hive supporting this feature. Thanks, Praveen On Fri, Nov 9, 2012 at 10:33 PM, Praveen Kumar K J V S < praveenkjvs.develo...@gmail.com> wrote: > Thank you very mu

Re: Hive Join with distinct rows

2012-11-09 Thread Praveen Kumar K J V S
out like semi joins that might > come in handy for this query or queries in the future. > > https://cwiki.apache.org/Hive/languagemanual-joins.html > > Mark > > > > On Fri, Nov 9, 2012 at 8:00 AM, Praveen Kumar K J V S < > praveenkjvs.develo...@gmail.com> wrote: > >

Re: Hive Join with distinct rows

2012-11-09 Thread Praveen Kumar K J V S
hive> SELECT DISTINCT col1, col2 FROM t1; > 1 3 > 1 4 > 2 5 > > > Similar to the second query above, your Query 2 selects each of the > distinct values for tuple possibly giving you multiple > records for a given id on the left side of the join. Consequently you don

Hive Sessionization

2012-03-07 Thread Praveen Kumar
Is there a better way to use Hive to sessionize my log data ? I'm not sure that I'm doing so, below, in the optimal way: The log data is stored in sequence files; a single log entry is a JSON string; eg: {"source": {"api_key": "app_key_1", "user_id": "user0"}, "events": [{"timestamp": 1330988326,

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

2012-01-11 Thread Praveen Kumar
nning below query, $ ./hive_tri.sh temp_table real_table 2011-12-10 2011-12-23 But, after running above command I am getting error: FAILED: Parse Error: line 2:31 cannot recognize input ''TABLE_NAME1'' in join source please help where I it is going wrong Thanks Praveen On

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

Re: Hive Query Question

2011-06-20 Thread Praveen Kumar
Gotcha, thanks ! pk

Hive Query Question

2011-06-10 Thread Praveen Kumar
If I have table timestamps: hive> desc timestamps; OK ts bigint hive> select ts from timestamps order by ts OK 1 2 3 4 5 6 7 8 9 10 30 32 34 36 38 40 42 44 46 48 50 70 74 78 100 105 110 115 and I want to make groups of the values where splits between groups occur where two time-consecu

Hive JSON transformation problem

2011-06-02 Thread Praveen Kumar
I have a log table with a single column, where each row contains JSON string in the following format; here are two log entries: { 'foo0': { 'bar0': 'A', 'bar1': 'B'} 'foo1': [ { 'params': { 'key0': 'valX', 'key1' : 'val1'}, 'time': 'time0'},