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

PutMongoRecord cannot handle arrays

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.0
    • 1.7.0
    • None
    • None

    Description

      From the mailing list:

       

      My json document is {"nom":"HAMEL","prenom":"YVES","tab":["aa","bb"]}
      My mecord reader use the schema (generated by InferAvroSchema):
      {
        "type" : "record",
        "name" : "Test",
        "fields" : [

      {     "name" : "nom",     "type" : "string",     "doc" : "Type inferred from '\"HAMEL\"'"   }

      ,

      {     "name" : "prenom",     "type" : "string",     "doc" : "Type inferred from '\"YVES\"'"   }

      , {
          "name" : "tab",
          "type" :

      {       "type" : "array",       "items" : "string"     }

      ,
          "doc" : "Type inferred from '[\"aa\",\"bb\"]'"
        } ]
      }

      I did a little debug and I think I get this exeception because
      PuMongoRecord maps json array to java array. But the mongodb java drivers
      doesn't support java array but only support List.

      Attachments

        Issue Links

          Activity

            People

              mike.thomsen Mike Thomsen
              mike.thomsen Mike Thomsen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: