spring-batch icon indicating copy to clipboard operation
spring-batch copied to clipboard

Flexible meta-data table names

Open chanbinme opened this issue 6 months ago • 1 comments

Expected Behavior

I would like to suggest adding support for customizing meta table names and their case (upper/lower) directly through configuration in Spring Batch. I believe this feature would help users adapt Spring Batch more easily to various database environments and organizational naming conventions.

Example:

spring:
  batch:
    jdbc:
      meta-table-map:
        BATCH_JOB_INSTANCE: myapp_job_instance
        BATCH_JOB_EXECUTION: myapp_job_execution
      table-case: lower    # default: upper

Context

At the moment, only the table prefix can be configured, and there is no way to fully customize meta table names or their case through configuration. This can cause difficulties with case-sensitive databases or in organizations that require specific naming standards. Providing a way to directly map table names and set their case would make configuration much more flexible and user-friendly.

Contribution

If the team agrees that this would be a valuable improvement, I would be very happy to work on the implementation and contribute a pull request. Of course, I’m open to any feedback or suggestions you may have about the approach.

Thank you very much for your time and consideration. I look forward to your thoughts!

chanbinme avatar Jul 07 '25 14:07 chanbinme

Thank you for requesting this feature. I agree, this could a valuable improvement.

However, I don't think we need a mapping between tables/sequences, but rather configurable properties like the current prefix (which could become obsolete). Once that in place, the case will be supported by design as well.

I see this as a backward compatible change (default values should be set to current table/sequence names), so I will plan this in a future minor release.

fmbenhassine avatar Nov 05 '25 09:11 fmbenhassine