Created 01-31-2019 08:39 PM
I have a JSON object with a complex `data` field object whose own fields and structure may vary. I don't want to enumerate each sub field and its type, but I want to preserve everything in `data`.
{ "kind": "some string", "data": { "field1": "value1", "field2": "value2", ... } }
I get these JSON objects in arrays and get many small flow files, which I want to merge into one file to write to disk. So I'm using MergeRecord, which led to JsonPathReader, which led to AvroSchemaRegistry (version 1.7.1).
In AvroSchemaRegistry I added a property with the value:
{ "name": "RedditRecord", "type": "record", "fields": [ { "name": "kind", "type": "string" }, { "name": "data", "type": "map" } ] }
However I'm getting an error trying to enable the controller service: 'Not a valid Avro Schema: the type "map" is not a defined name.' However I see the map type in the Avro 1.7.1 specs: https://avro.apache.org/docs/1.7.1/spec.html#schema_complex
I also tried setting the type to "record", but got the same error.
Are complex types not supported by AvroSchemaRegistry?