Easiest way is to post csv/json/whatever through the http endpoint into a replacing merge tree table.
Duplicates get merged out, and errors can be handles at the http level. (Admittedly, one bad row in a big batch post is a pain, but I don’t see that much)