Details
-
Improvement
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
When using record readers and writers i ran into a problem where i tried to give it a CSV with the same header twice, i.e something like
------------------------------------------
header1,header2,header1
a,b,c
------------------------------------------
(obviously not real data)
When the reader tried to parse the flowfile as records it threw this error: "Failed to read Header line from CSV"
Which is not very indicative, when i went ahead and debugged the source code i could see the real error is:
java.lang.IllegalArgumentException: The header contains a duplicate name: "header1" in [header1, header2, header1]
(Pictures are provided)
This is a case i ran into recently.
I also have another case where tried to read an avro file which has a '#' (hashtag) character in one of the headers, which is illegal in the avro schema defenition.
But the error i got there was : "failed to parse incoming data",
And again, when i debugged the code i found the real error
What the main point is to give a more indicative error message for record readers / writers, which not only gives the error itself but its cause
I could probably look up many more reasons readers / writers could fail and they will not give a good error message, but i believe these 2 are fine as an example
Attachments
Attachments
Issue Links
- links to