1.9 DDL create table with formatted nested json

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

1.9 DDL create table with formatted nested json

ysn2233
Hi guys
I am trying the DDL feature in branch 1.9-releasae.  I am stucked in creating a table from kafka with nested json format. Is it possibe to specify a "Row" type of columns to derive the nested json schema?

String sql = "create table kafka_stream(\n" +
"  a varchar, \n" +
"  b varchar,\n" +
"  c int,\n" +
"  inner_json row\n" +
") with (\n" +
"  'connector.type' ='kafka',\n" +
"  'connector.version' = '0.11',\n" +
"  'update-mode' = 'append', \n" +
"  'connector.topic' = 'test',\n" +
"  'connector.properties.0.key' = 'bootstrap.servers',\n" +
"  'connector.properties.0.value' = 'localhost:9092',\n" +
"  'format.type' = 'json', \n" +
"  'format.derive-schema' = 'true'\n" +
")\n";

Thank you very much!