-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read a fixed-length without line-ending. [BATCH-2538] #1064
Comments
Aaron Patula commented I'm a new contributor and would like to work on this issue. |
Mahmoud Ben Hassine commented
I'm not sure I understand this, do you mean the whole file is on a single line? Can you attach an example please? |
Mahmoud Ben Hassine commented Any update on this? |
Hironobu Takahashi commented
Yes. Examples are shown below. Fixed-length file (Delimiter between records is number of bytes. 32 bytes = 1 record) Sale012016 1 00000011000000000Sale022017 2 00000022000000000Sale032018 3 00000033000000000 |
Thanks for your update. Indeed, this type of files can be read using a custom |
Hi @benas, can I look into this? |
@parikshitdutta Sure! Anything without a PR is open for contribution, no need to ask. Thank you for all your contributions! |
Hi @benas, I am thinking to expose FixedLengthBufferedReader through a factory, say FixedLengthBufferedReaderFactory. Do you see I am overdoing or that could lead to redundancy? I see setter for few readers that accept BufferedReaderFactory as argument, with lambda things are different, without that having factory would be easy to inject and satisfy respective setters. Your thought? |
Please review the PR #3712, I will look forward to your feedback. |
@parikshitdutta Thank you for your PR. To answer your question, I need to dig in in more details. However, this issue is not in our roadmap for now, we are focusing on the upcoming v4.3. I will let you know when we assign this issue to a release and start working on it. Thank you. |
@parikshitdutta This is not critical, it could be addressed with a custom buffered reader as shown previously. Now adding this buffered reader as a built-in component in Spring Batch can be done in a minor version of the v5 line (5.1, 5.2, etc). For 5.0, we will be focusing on big changes that were not possible to introduce in minor versions of v4. We are currently working on our future release planning, so I will update this issue once it is assigned to a milestone. I just linked your PR to this issue. |
Thanks @benas for detailed information, and linking the PR to respective issue. |
Kiichi Kuramoto opened BATCH-2538 and commented
FlatFileItemReader can not read a fixed-length file without line-ending, because it call BufferedReader#readline() at reading a record.
In general, a fixed-length file is often a line-ending not exist.
I would like to add new BufferedReader implementation for reading fixed-length file without line-ending (by specifying fixed-length size).
Affects: 3.0.7
2 votes, 10 watchers
The text was updated successfully, but these errors were encountered: