JSON Payload:
(JSON有效负载:)
{
"BILLING_EVENT_RULE_MET_DT": "lsks",
"PlanType":"hhh"
}
AVRO Schema:
(AVRO模式:)
{
"name": "Subscription",
"type":"record",
"doc": "Subscription details",
"fields":
[
{ "name": "BILLING_EVENT_RULE_MET_DT", "type":[ "null","string"],"default": null },
{"name": "PlanType",
"type":
{
"name":"PlanType",
"type": "fixed",
"size": 4
}
}
]
}
ERROR:
The value [hhh] for field [PlanType] should be [FixedType <size: 4, name: PlanType, namespace: None, aliases: None>].
While validating its giving me the following error, what I am supposed to write in the json payload for PlanType field?
(在验证它给我以下错误的同时,我应该在JSON有效载荷中为PlanType字段写什么?)
Actually this all I am exploring as I want to define the maxlength and minlength for a field in AVRO schema similar to XML schema. (实际上,我想探索所有这些,因为我想为类似于XML模式的AVRO模式中的字段定义maxlength和minlength。)
ask by Apu translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…