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

JSONRecordSetWriter does not account for schema changes when writing serialized form

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.26.0, 2.0.0-M3
    • 2.0.0
    • Core Framework
    • None

    Description

      When using the RemoveRecordField processor with the JsonRecordSetWriter as a writer, I came across an issue where not all fields were removed in the resulting records.

      When debugging, I noticed the JsonRecordSetWriter uses the WriteJsonResult, which checks if there is a serialized form of the record. If there is, it just uses that even though the serialized form may contain fields that are not present anymore.

      There is a check on the schema of the record, if it is the same as the target schema, but the serialized form does not account for this schema change introduced by the RemoveRecordField processor.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sbylemans Sander Bylemans
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: