0

Is there a way to do this with CSV file.

I have multiple steps to execute on which each step is inserting data into the DB.

My scenario is if my 3rd step fails then step1 and step2 should also get failed or inserted data should get roll backed.

In my current design step1 and step2 successfully inserted data into DB even though my 3rd steps failed.

  • Do everything in a single transaction –  Jan 13 '20 at 09:11
  • Does this answer your question? [Job level Transactionality in Spring Batch](https://stackoverflow.com/questions/12492176/job-level-transactionality-in-spring-batch) – Mahmoud Ben Hassine Jan 13 '20 at 09:14
  • I can't use single transaction model as each step committing data to a tables and tables are inter-dependent. For ex: step 1 inserts some in table then in step 3 I need to get some data from a column from step 1(i.e table 1)and insert into some column in step 3(i.e. table 3). – Amit Banger Jan 13 '20 at 10:09

0 Answers0