How to perform upsert operation in PostgreSQL on Cloud Data Fusion

I want to do operation upsert before write on PostgreSQL on Cloud Data Fusion, I can easily write with the sink plugin but I can't find how can I do the update if the value already exist, thanks.


As pointed out by @ShipraSarkar that there is no option in the Postgres sink plugin for an upsert operation. Thus, INSERT ON CONFLICT statement in PostgreSQL can be used for the same. As you rightly pointed out, first one can put the data in a staging table using the sink plugin and then run a query using Postgres executor to merge (i.e. upsert) it with the target table.