Re: Hive Query :: Implementing case statement

2014-02-19 Thread yogesh dhari
Thanks a lot Stephen Sprague :) :) It worked.. , just to remove the ;from here, bcoz it was throuig sub query systax error... create table NEW_BALS as select * from ( select b.prev as NEW_BALANCE, a.key from TABLE_SQL a join TABLE_SQL_2 b on (a.key=b.key) where a.code='1'; UNION ALL

Re: Hive Query :: Implementing case statement

2014-02-19 Thread yogesh dhari
Hello Stephen , Yes, actully I have used Left Outer Join instead of Join, there were left outer joins in RDBMS Query instead of join. Thanks again :) On Thu, Feb 20, 2014 at 10:45 AM, Stephen Sprague sprag...@gmail.comwrote: Hi Yogesh, i overlooked one thing and for completeness we should

RE: Hive Query :: Implementing case statement

2014-02-18 Thread Peter Marron
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

Re: Hive Query :: Implementing case statement

2014-02-18 Thread Navis류승우
If key is unique, you might overwrite values by using hbase handler. 2014-02-18 22:05 GMT+09:00 yogesh dhari yogeshh...@gmail.com: Yes, Hive does not provide update statement, I am just looking for the work arround it, how to implement it On Tue, Feb 18, 2014 at 6:27 PM, Peter Marron

Re: Hive Query :: Implementing case statement

2014-02-18 Thread Stephen Sprague
maybe consider something along these lines. nb. not tested. -- temp table holding new balances + key create table NEW_BALS as select * from ( select b.prev as NEW_BALANCE, a.key from TABLE_SQL a join TABLE_SQL_2 b on (a.key=b.key) where a.code='1'; UNION ALL select b.prev as