Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Batch Tables Purging

What is the best way to purge Spring Tables?

Does Spring provides any APIS for purging? or, Do We need to execute delete statements on all Spring Batch Tables?

like image 732
ram533 Avatar asked Nov 11 '17 00:11

ram533


2 Answers

i have been struggling with this for a ling time but, there is no standard implementation for this.

Then i came up with a my own stored procedure ,

I have created my own variable - for clearing last 6 months data AGO_SIX_MONTH_DATE

You can use your own value.

The solution is at below link -

Spring Batch Meta-Data tables Purging

like image 133
Ashish Shetkar Avatar answered Oct 09 '22 20:10

Ashish Shetkar


Another option would be to set batch.data.source.init=true in your properties this would mean that you drop and re-create the tables on each new deployment..

like image 35
mkane Avatar answered Oct 09 '22 19:10

mkane