Hi all,

(asked in Slack some days ago - no answer, so trying here)


NiFi 2.4.0.

I urgently need to use a ValidateRecord with an ${avro.schema} set. Having frequently input record values like of 
"<number>-", e.g. "1-", in a field with avro type "long". Which is not valid, should be of course 
"-<number>". I've expected a failed validation, with a "Validation Details Attribute Name" att containing an 
information about the above.

Instead I'm getting a bulletin msg:

        ValidateRecord[id=...] Failed to process FlowFile[filename=....csv]; will route 
to failure: org.apache.nifi.serialization.MalformedRecordException: Error while getting 
next record - Caused by: java.lang.NumberFormatException: For input string: "1-"

and no "Validation Details Attribute Name" att set.

Which is confusing me - why does a VALIDATION runs into a 
"MalformedRecordException"?
Bug, or did I miss/misunderstand something?

As of now, I use the "failure" relationship, fix the already found (fixable :)) 
violations  like the above, and re-route to the ValidateRecord. But this means getting NOT a 
"stable" flow, as I can't differ between invalid records or whatever other (real) 
failures.


Regards,
Michael

Reply via email to