Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
Similar to CSVRecordReader, JSON readers should utilize specified date format for Record validation.
JsonPathRowRecordReader.convert(final Object value, final DataType dataType) is called when coerceTypes is false. But the method currently does not convert String values for Date/Time/Timestamp field types at all. The method should try convert like CSVRecordReader does. Without doing so, ValidateRecord routes any records validated against a record schema having Date/Time/Timestamp fields to 'invalid' relationship.
https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-standard-services/nifi-record-serialization-services-bundle/nifi-record-serialization-services/src/main/java/org/apache/nifi/json/JsonPathRowRecordReader.java#L138
A NiFi template file to illustrate the issue is attached.