"Header is missing required fields" Message
Brought to you by:
aruckerjones,
sconway
In HeaderColumnNameMappingStrategy.captureHeader(), line 119 checks that !requiredKeys.isEmpty()
. Then, on line 126, it does builder.appendWithSeparators(requiredKeys, ",")
. Because of the check on line 119, requiredKeys
will always have a single element. It would be better (and I think it was intended) to have all required headers that were missing.
In addition, can you please include the headers from the CSV? It would be helpful for debugging why it didn't find the header(s).
Sorry, it's late, and I'm wrong. The first paragraph works as intended -- requiredKeys could still have multiple values. But would you mind adding the the
header
array to the error message?I added the list of headers to the error message. It will be released in 4.2.