join 2 tables

2014-11-12 Thread Franco Barrientos
I have 2 tables in a hive context, and I want to select one field of each table where id’s of each table are equal. For example, val tmp2=sqlContext.sql(select a.ult_fecha,b.pri_fecha from fecha_ult_compra_u3m as a, fecha_pri_compra_u3m as b where a.id=b.id) but i get an error:

Re: join 2 tables

2014-11-12 Thread Rishi Yadav
please use join syntax. On Wed, Nov 12, 2014 at 8:57 AM, Franco Barrientos franco.barrien...@exalitica.com wrote: I have 2 tables in a hive context, and I want to select one field of each table where id’s of each table are equal. For example, *val tmp2=sqlContext.sql(select