0

I am working on inserting data to database through talend ETL tool. For one of the field I have an auto increment number. however if I kill the server in talend and I start again, I have to empty the database because it will get duplicate (auto increment PK ). I want a way to store the auto incremented field in the database, starting from the last value inserted. So if the last value in database is 5 .. the next one should be 6

1 Answers1

1

Before starting your job, you can query the DB table to grab the max value of that field from the DB table, increment by one and then use this value as your starting number for the next insertion of rows.

Neo
  • 779
  • 5
  • 13