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 Plain View
Hive >> mail # user >> joining 2 tables


+
Sandeep Nemuri 2013-08-21, 11:33
+
Stephen Sprague 2013-08-21, 16:16
Copy link to this message
-
Re: joining 2 tables
Thanks for your advice Stephen Sprague.
On Wed, Aug 21, 2013 at 9:46 PM, Stephen Sprague <[EMAIL PROTECTED]> wrote:

> I'm not sure if you'd call that a join.   that just looks like two tables
> side by side in some random order.
>
> the only way to get that (that i can see) is if there is some kind of
> function between the two "ids" in the two tables. That way you could join
> on A.id1 = function(B.id2)  otherwise the only other thing i can think of
> to use the ROW_NUMBER() analytics function in hive 0.11 and join on that if
> it is indeed random.
>
>
>
>
>
> On Wed, Aug 21, 2013 at 4:33 AM, Sandeep Nemuri <[EMAIL PROTECTED]>wrote:
>
>> Hi all ,
>>
>> I want to join two tables
>>
>>
>> **
>>
>> I have table_A:
>>
>> id1 var1 var2
>> 1   a    b
>> 2   c    d
>>
>> Table_B:
>>
>> id2 var3 var4
>> 3   e    f
>> 4   g    h
>>
>> Expected Output is :
>>
>> id1 var1 var2 id2 var3 var4
>> 1   a    b     3    e   f
>> 2   c    d     4    g   h
>>
>>
>> Thanks in advance.
>> --
>> --Regards
>>   Sandeep Nemuri
>>
>
>
--
--Regards
  Sandeep Nemuri
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