0
は、私は以下の目的を持っています。私はこのためのスキーマを考案しようとしています。しかし、:(動作していないようアブロスキーマ障害
私は、次の2つを試してみました:。。
{
"name": "ProductsOrNull",
"type": ["null", {
"type": "array",
"name": "Products",
"items": {
"type":"record",
"name": "Product",
"fields": [{
"name":"ProductId",
"type":"long"
}, {
"name":"ProductName",
"type":"string"
}
]
}
}],
"default": null
}
しかしjava -jar avro-tools-1.8.2.jar fromjson --schema-file prod.avsc prod.json > lol.avro
を実行しているとき、それはException in thread "main" org.apache.avro.SchemaParseException: No type: <...>
で失敗
私も同じエラーでこれをトライ:
{
"type": ["null", "array"],
"name": "Products",
"items": {
"type":"record",
"name": "Product",
"namespace": "{{ dataModelSchema }}",
"fields": [{
"name":"ProductId",
"type":"long"
}, {
"name":"ProductName",
"type":"string"
}
]
}
}
問題があり、2つの違いは何です私は本当に理解していない。