You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Shengnan YU <ys...@hotmail.com> on 2019/08/15 06:34:48 UTC
1.9 DDL create table with formatted nested json
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!