Skip to content
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

Specify column names in flat file on first line [BATCH-211] #3364

Closed
spring-issuemaster opened this issue Nov 20, 2007 · 4 comments
Closed

Specify column names in flat file on first line [BATCH-211] #3364

spring-issuemaster opened this issue Nov 20, 2007 · 4 comments
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Nov 20, 2007

Dave Syer opened BATCH-211 and commented

Specify column names in flat file on first line. The only problem is: it only really works for delimited files, unless someone has an idea for an existing format for fixed-length file header?


Affects: 1.0-m3

Attachments:

Referenced from: commits ad85f55

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Nov 20, 2007

Mattias Hellborg Arthursson commented

I think there are several different issues here that need to be addressed:

  • The basic case where we have a delimited file with column names in the first row and we want to use them as the field names.
  • There is also the case where we just want to skip one or several lines from the beginning of the file. E.g. we might want to specify the field names manually anyway, and there's also a possibility that there might be one or several 'separation lines', separating the headers from the actual data.
  • If it is a fixed-length file the headers (if any) should be fixed-length as well. Then the same approach as for the delimited files should be possible to use, right?
@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Nov 21, 2007

Robert Kasanicky commented

For starters I've put together a straightforward implementation (patch attached). I guess the feature for skipping comments can be used to skip lines that separate the header, so it is not supported explicitly.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Nov 21, 2007

Dave Syer commented

Patch applied with some modifications. Also added setLinesToSkip(int) to SimpleFlatFileinputSource, so that you can skip lines at the start of a file if they are neither commented, nor contain useful header information.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Aug 7, 2008

Dave Syer commented

Assume closed as resolved and released

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.