spring-projects / spring-projects/spring-batch

Add optional function for footer record processing to FlatFileItemReader [BATCH-2539]

Open
#1,063 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: infrastructure status: waiting-for-triage type: enhancement
Dominant language
Java
Stars
3k
Forks
2.5k
Avg merge
6d 53m
Merged PRs (30d)
3

Description

Kiichi Kuramoto opened BATCH-2539 and commented

I read BATCH-826, but, for a output file by FlatFileItemWriter,
I think that FlatFileItemReader should support footer handling.

  • For output
    • I can write the header records by FlatFileHeaderCallback.
    • I can write the footer records by FlatFileFooterCallback.
  • For input
    • The header records processing can be performed.
      (LineCallbackHandler I/F or linesToSkip)
    • The footer records processing can not be performed(hadling and skipping).

Input and output are asymmetrical, it cannot be completed file-to-file job only Spring Batch.
The footer records processing must also be able to in the same way as the header records.
Therefore, for FlatFileItemReader, I would like you to add options as follows.

  • skip footer records
  • call back I/F for footer records

Affects: 3.0.7

1 votes, 8 watchers

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating FlatFileItemReader and reviewing its existing linesToSkip and LineCallbackHandler handling for input headers. Define the footer boundary and verify how both skipping footer records and invoking a footer callback should work. Done means input processing supports the requested footer options and preserves the existing header behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.