Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-4983

JsonTreeReader and JsonPathReader should utilize specified date/time/timestamp format when used from ValidateRecord

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Extensions
    • 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.

      Attachments

        1. NIFI-4983.xml
          78 kB
          Koji Kawamura

        Issue Links

          Activity

            People

              derekstraka Derek Straka
              ijokarumawak Koji Kawamura
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: