I have a JSON flow-file and I need determine if I should be doing an INSERT or UPDATE. The trick is to only update the columns that match the JSON attributes. I have an ExecuteSQL working and it returns executesql.row.count, however I've lose the original JSON flow-file which I was planing to use as a routeonattribuite. I'm trying to get the MergeContent to join the ExecuteSQL (dump the Avro output, I only need the executesql.row.count attribute) with the JSON flow. I've set follow before I do the ExecuteSQL:
Alternativly I could create a MERGE, if there is a way to loop through the list of JSON attributes that match the Oracle table?
Yes we managed to get this with work, however the solution did not use NiFi, we used an Oracle View with an INSTEAD of trigger.