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 Threaded View
Hive >> mail # user >> Hive Query :: Implementing case statement


Copy link to this message
-
RE: Hive Query :: Implementing case statement
From https://cwiki.apache.org/confluence/display/Hive/Home

"Hive is not designed for OLTP workloads and does not offer real-time queries or row-level updates."

As far as I am aware "UPDATE" isn't even in the Hive DML.

Z

Peter Marron
Senior Developer
Trillium Software, A Harte Hanks Company
Theale Court, 1st Floor, 11-13 High Street
Theale
RG7 5AH
+44 (0) 118 940 7609 office
+44 (0) 118 940 7699 fax
[https://4b2685446389bc779b46-5f66fbb59518cc4fcae8900db28267f5.ssl.cf2.rackcdn.com/trillium.png]<http://www.trilliumsoftware.com/>
trilliumsoftware.com<http://www.trilliumsoftware.com/> / linkedin<http://www.linkedin.com/company/17710> / twitter<https://twitter.com/trilliumsw> / facebook<http://www.facebook.com/HarteHanks>

From: yogesh dhari [mailto:[EMAIL PROTECTED]]
Sent: 18 February 2014 12:39
To: [EMAIL PROTECTED]
Subject: Hive Query :: Implementing case statement

Hello All,

I have a use case where a table say TABLE_SQL is geting updated like.
1st Update Command

update TABLE_SQL a
set BALANCE = b.prev
from TABLE_SQL_2 b
where a.key = b.key and a.code = "1"
2nd Update Command

update TABLE_SQL a
set BALANCE = b.prev
from TABLE_SQL_3 b
where a.key = b.key and a.code = "2"
same column is getting update twice in sql table,

I have a Table in Hive say TABLE_HIVE.

How to perform this kind operatation in HIVE,

Pls Help,

Thanks in Advance
Yogesh Kumar

  
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