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

ValidateRecord does not handle Map type correctly

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: Extensions
    • Labels:
      None

      Description

      Consider the following Avro Schema:

      {
          "name" : "test",
          "type" : "record",
          "fields" : [ {
              "name" : "field1",
              "type" : {
                  "type" : "map",
                  "values" : "string"
              }
          } ]
      }
      

      and corresponding JSON data adhering to the schema:

      [{
          "field1": {
              "toto" : "v1",
              "titi" : "v2"
          }
      }]
      

      ValidateRecord marks the record as invalid though it should be valid. The message in the provenance event is "Record #1 is invalid due to:
      MapRecord[

      {toto=v1, titi=v2}

      ] is not a valid value for /field1: Value is of type org.apache.nifi.serialization.record.MapRecord but was expected to be of type MAP[STRING]".

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mattyb149 Matt Burgess
                Reporter:
                mattyb149 Matt Burgess
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: