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

[Bug]: CSVImport ends on first file that contains no content after the header when using "Header row present?" #4561

Open
jjjcck opened this issue Nov 13, 2024 · 0 comments

Comments

@jjjcck
Copy link

jjjcck commented Nov 13, 2024

Apache Hop version?

2.10

Java version?

17

Operating system

Windows

What happened?

Just as in CsvInput.java from Pe..t.... 9 the CSVInput ends the stream as soon as it finds a file without data after the header.

Example:
Create fileH.csv with only a header row
Create fileC.csv with header row and one content row
Create ktr-file which has a stream with the two filename, which are then put into the CSVInput Step so it will read the content of the file. Set "Header row present?" to true for the CSVInput-Step.
Current faulty result: No rows will be in the output of the CSVInput Step
Expected result: The content of fileC.csv should be in the output of the step.

Could
if (data.fieldsMapping.size() == 0) { return false;
in openNextFile()
in
hop/plugins/transforms/textfile/src/main/java/org/apache/hop/pipeline/transforms/csvinput
be the problem?

PS: In Pen.t... 6 this was no problem.

Issue Priority

Priority: 3

Issue Component

Component: Transforms

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

No branches or pull requests

1 participant