Closed joaop132 closed 4 years ago
Hi You should define the array type like this in the schema:
{
"type": "record",
"name": "Test",
"namespace": "my.topic",
"fields": [
{
"name": "name",
"type": "string"
},
{
"name": "date",
"type": "string"
},
{
"name": "fields",
"type": {
"type": "array",
"items": "string"
}
}
]
}
Let me know if there's anything else I can help with, closing this for now.
Hi,
I'm trying to create an avro schema and one of my fields need's to be a list of strings, but when i run my code it gives me a error of undefined type. I tried to debug a little of your code and from what've seen looks like it's going the wrong flow. Can you help me?
Here is the schema I'm trying to build
{ "type": "record", "name": "Test", "namespace": "my.topic", "fields": [ { "name": "name", "type": "string" }, { "name": "date", "type": "string" }, { "name": "fields", "type": "array", "items": "string" } ] }
Thank you.