Avro 模式可以有未知/动态字段名称吗?

Can Avro schema have unknown / dynamic field names?

考虑以下 json:

{
  "id": "5ffhj4ksWRyt",
  "name": "some name",
  "custom_fields": [
    "randomFieldName1": "a",
    "randomFieldName2": "b"
  ]

idname 字段总是已知的,但 custom_fields 名称是动态的,可以有任何键名。是否可以编写一个将这一点考虑在内的模式?

您可以将 custom_fields 定义为 map

https://avro.apache.org/docs/current/spec.html#Maps