0

I have to insert data into 3 tables which is coming from a previous processor and ,it must be handled in a single transaction . Can someone suggest a good approach through NiFi .

  • 1
    are commands to include into one transaction coming in single flowfile or in separate? – daggett Jun 10 '21 at 11:58
  • Use putsql or putdatabaserecord processor – Arun Sai Mustyala Jun 14 '21 at 09:38
  • @dagget 7 separate flowfiles. – Tahseem Ahmad Jun 16 '21 at 07:48
  • 1
    [PutSql](https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.13.2/org.apache.nifi.processors.standard.PutSQL/index.html) supports `fragment.*` and `Support Fragmented Transactions` parameters that could force files to be processed in one transaction. – daggett Jun 16 '21 at 09:31
  • @daggett I am using that but the problem is ,it's not behaving properly ,sometimes it works ,sometimes not . And it is taking too long to process sometimes 5-6 minutes . Sometimes I need to stop and start Putsql to process flowfiles. – Tahseem Ahmad Jun 17 '21 at 04:12
  • 1
    Edit question and specify all details for one case that works not properly. How many files, what are the values of `fragment.*` attributes for all files in batch. – daggett Jun 17 '21 at 04:32

0 Answers0