Michael, For using upsert, I need to fetch the primary ID at the least and then do processing and update the columns. I need to read the entire table to fetch primary keys and then do processing at service layer and do an upsert, which I think is quite a task for huge table.
Please let me know your thoughts, Thanks, Satya On 14-Jul-2015 7:44 pm, "Michael McAllister" <[email protected]> wrote: > Satya > > Try the UPSERT SELECT statement:- > > https://phoenix.apache.org/language/#upsert_select > > Michael McAllister > Staff Data Warehouse Engineer | Decision Systems > [email protected] | C: 512.423.7447 | skype: michael.mcallister.ha > <[email protected]> | webex: https://h.a/mikewebex > > > This electronic communication (including any attachment) is confidential. > If you are not an intended recipient of this communication, please be > advised that any disclosure, dissemination, distribution, copying or other > use of this communication or any attachment is strictly prohibited. If you > have received this communication in error, please notify the sender > immediately by reply e-mail and promptly destroy all electronic and printed > copies of this communication and any attachment. > > On Jul 14, 2015, at 5:09 AM, Ns G <[email protected]> wrote: > > HI There, > > I have a query like one below > > UPDATE table_1 > SET id1 = (SELECT Min(id1) > FROM table_1 t2 > WHERE table_1.id3 = t2.id3) > WHERE id3 = id4 > > I am trying to implement this in Apache Phoenix. Can anyone suggest how > should i be doing this as we do not have set command in phoenix. I am using > 4.3.1 version. > > > Thanks, > > Satya > > > > > >
