i have Apache Avro schema

我的avro schema 如下

{
  "type" : "record",
  "name" : "KafkaAvroMessage",
  "namespace" : "xxx",
  "fields" : [ {
    "name" : "aaa",
    "type" : "string"
  }, {
    "name" : "bbb",
    "type" : [ "null", "string" ],
    "default" : null

  },{
    "name" : "ccc",
    "type" : [ "null", "string" ]

  },
    {
      "name" : "ddd",
      "type" : "string",
      "default" : ""
    } ]
}

The sql worte is like this
我下的sql如下
CREATE TABLE xxx (
`aaa` STRING NOT NULL,
`bbb` STRING ,
`ccc` STRING NOT NULL,
`ddd` STRING NOT NULL
) WITH(
...
'format' = 'avro'
);

The sql can parse the aaa bbb ddd field correctly,but cannot parse the ccc 
field. Excuse me,what is the problem with my sql writing,please give me a 
correct wording
这个sql可以解析 aaa、bbb、ddd 字段,不能解析ccc字段,请问我如果想用flinksql 解析这个schema,正确的写法是什么






 





 

Reply via email to