1

enter image description here

Parent Table is inserted,but Child Table is not inserted!

How to roll back the Parent Table?Any help is appreciate!

Cong
  • 479
  • 4
  • 16
  • Nifi not create to manage transactions between different processors. You could delete parent rows on child insertion failure... – daggett Nov 18 '19 at 04:48
  • Maybe i can use the same processor (such as ExecuteScript Proccessor)before inserting DB?This is just a guess....or API could get it?I need some suggestion.Thanks!@daggett – Cong Nov 18 '19 at 05:46
  • In ExecuteScript you could run different statements in one transaction. – daggett Nov 18 '19 at 06:07
  • Check this: https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-groovyx-nar/1.5.0/org.apache.nifi.processors.groovyx.ExecuteGroovyScript/additionalDetails.html – daggett Nov 18 '19 at 06:08
  • Would you please add your complete flow to question? There is a way to insert parent and child records to DB in one transaction using Split, ReplaceText and MergeContent. – Behrouz Seyedi Nov 18 '19 at 18:25
  • The scenario is that inserting parent and child record to DB,but child record does not succeed.How to roll back the parnet record?Please show your DateFlow.I would get hints.Thank you@BehrouzSeyedi – Cong Nov 19 '19 at 00:24

0 Answers0