I'm trying to create a PG in NIFI that implements the following MERGE as a query:
MERGE INTO MCPR_OWN.LIVENESS l
USING (select ? as cdn from dual) ct
ON (ct.cdn = l.cdn)
WHEN MATCHED THEN
UPDATE SET
l.LIVENESS_ENABLE = ?,
l.DATETIME_LIVENESS_UPDATE = TO_DATE(?,'YYYY-MM-DD HH24:MI:SS')
WHERE (l.DATETIME_LIVENESS_UPDATE < TO_DATE(?,'YYYY-MM-DD HH24:MI:SS'))
WHEN NOT MATCHED THEN
INSERT (CDN, LIVENESS_ENABLE, DATETIME_LIVENESS_UPDATE)
VALUES (?, ?, TO_DATE(?,'YYYY-MM-DD HH24:MI:SS'))
Mapping the parameters in a PG of type UpdateAttribute set as shown in the figure:


While as far as the PutSQL PG settings are concerned, they are as follows:

The problem is that even if the PG containing the MERGE returns a success, the modifications do not affect the DB on which NIFI points. Can anyone give me some more information ?
We also carry out tests by connecting directly to the DB via DBeaver and the query works fine. The query tested on DBeaver follows:
MERGE INTO LIVENESS l
USING (select :cdn as cdn from dual) ct
ON (ct.cdn = l.cdn)
WHEN MATCHED THEN
UPDATE SET
l.LIVENESS_ENABLE = :liv_en,
l.DATETIME_LIVENESS_UPDATE = TO_DATE(:dtp,'YYYY-MM-DD HH24:MI:SS')
WHERE (l.DATETIME_LIVENESS_UPDATE < TO_DATE(:dtp,'YYYY-MM-DD HH24:MI:SS'))
WHEN NOT MATCHED THEN
INSERT (CDN, LIVENESS_ENABLE, DATETIME_LIVENESS_UPDATE)
VALUES (:cdn, :liv_en, TO_DATE(:dtp,'YYYY-MM-DD HH24:MI:SS'));
Unfortunately I don't have access to NIFI logs.