hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugene Koifman <>
Subject Re: Update operation on hive table using Join
Date Mon, 17 Oct 2016 18:18:45 GMT
This is not supported.  The same can be achieved using Merge statement which is WIP:


From: Priyanka Raghuvanshi <<>>
Reply-To: "<>" <<>>
Date: Monday, October 17, 2016 at 2:14 AM
To: "<>" <<>>
Subject: Update operation on hive table using Join


Is there any way to  update a Hive table with join.
Following is the query :

SQL query

UPDATE _STCC_CurrentLocationMaPData
set [Address]=replace(CL.cOut_Event_Description,'''''''',''''),
[Latitude]=CL.fOut_latitude ,
[Longitude]=CL.fOut_longitude ,
[Speed] =CL.fOut_Speed,
[dTimeStamp] =MV.dTimeStamp,
[GPSState] = CL.bGPS
FROM  #MaxValues MV
INNER JOIN CartrackDetailsInfo CL on MV.dTimeStamp=CL.dTimeStamp AND MV.AcqAccountNumber=CL.AcqAccountNumber
INNER JOIN  _STCC_CurrentLocationMaPData CLR on MV.AcqAccountNumber=CLR.AccountNo
where CLR.AccountNo=MV.AcqAccountNumber

HQL query
UPDATE current_location set address=regexp_replace(cl.cout_event_description,'''''''',''''),latitude=cl.latitude,longitude=cl.longitude
,speed =cl.speed,dtimestamp =mv.dtimestamp,reg_no=cl.registration,gpsstate = cl.bgps
FROM  default.maxvalues mv
INNER JOIN cartrackdetailsinfo cl on mv.dtimestamp=cl.dtimestamp ANDmv.acqaccountnumber=cl.acqaccountnumber
INNER JOIN current_location clr on mv.acqaccountnumber=clr.deal_number
where clr.deal_number=mv.acqaccountnumber;
FAILED: ParseException line 1:221 missing EOF at 'FROM' near 'bgps

View raw message