You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "macdoor615 (Jira)" <ji...@apache.org> on 2022/04/15 08:45:00 UTC
[jira] [Commented] (NIFI-4983) JsonTreeReader and JsonPathReader should utilize specified date/time/timestamp format when used from ValidateRecord
[ https://issues.apache.org/jira/browse/NIFI-4983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17522739#comment-17522739 ]
macdoor615 commented on NIFI-4983:
----------------------------------
this feature is useful
> 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
> Assignee: Derek Straka
> Priority: Major
> Attachments: NIFI-4983.xml
>
>
> 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.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)