Closed mrwilby closed 9 years ago
Given schema is invalid. This one parses well:
{
"type": "record",
"namespace": "com.philips.lighting.dna.ingestion",
"name": "LongList",
"fields": [
{
"name": "inner_name",
"type": {
"type": "map",
"values": {
"type": "record",
"name": "ATM",
"fields": [
{
"name": "serial_no",
"type": "string"
},
{
"name": "location",
"type": "string"
}
]
}
}
}
]
}
Please notice that the proper map definition would not be "type": "map"
but "type": {"type": "map", "values": "whatever"}
Thank you. Finding a decent example of map schemas is actually quite difficult. Almost all seem broken!
Appreciate the quick feedback
I tried this, which is based on an example I groked on Pentaho's website:
...
And the following error is generated:
2015/09/21 11:58:05 Unknown type name: map make: *\ [codegen] Error 1
It looks like the code that parses the "type" sees a string value associated with the "type: map" line, and then only can interpret basic types, excluding maps, arrays, enums etc.
Perhaps I misunderstood or then this example avro schema is invalid? (source for the schema: http://wiki.pentaho.com/display/EAI/Avro+Input)