I found a theoretical solution. The easiest way is to override jdbc created by apache phoenix. You must override the functions exceuteQuery () and updateQuery (). You need to replace "insert" and "update" with "upsert". What do you think? I have not tested it yet.
source share