Support Questions
Find answers, ask questions, and share your expertise

I want to insert and update data at the same time in database using nifi

I have a data-file which have say 10 records with primary keys 1-10 and i have some data in my database,say 5 records with primary keys 1-5. I want to insert that file data into my database which will update my 5 records which is having same primary key and insert the remaining 5 records, a total of 10 records in database.Here is my workflow insertupdateworkflow.xml , insertupdateworkflow.png,in this , i am first trying to update the records and redirecting the failed records to another jsontosql processor with insert statement so as to insert the remaining five records in the database.But the putsql is giving error "Index array out of bounds" and not inserting the data but is updating the existing data correctly.Please help me out with this.



Have you resolved the issue ?

; ;