[ 
https://issues.apache.org/jira/browse/NIFI-4983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Koji Kawamura updated NIFI-4983:
--------------------------------
    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.
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

  was:Similar to CSVRecordReader, JSON readers should utilize specified date 
format for Record validation.


> JsonTreeReader and JsonPathReader should utilize specified 
> date/time/timestamp format when used from ValidateRecord
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-4983
>                 URL: https://issues.apache.org/jira/browse/NIFI-4983
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Koji Kawamura
>            Priority: Major
>
> 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.
> 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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to