1.blink_planner ????ddl????array??????????????select ???????????????????? 2.blink_planner ????????????????????????????????????????????????flink????????????
3.????????flink-planner???????????? CREATE TABLE sourceTable ( event_time_line array<ROW ( `rule_name` VARCHAR, `count` VARCHAR )> ) WITH ( 'connector.type' = 'kafka', 'connector.version' = 'universal', 'connector.startup-mode' = 'earliest-offset', 'connector.topic' = 'topic_test_1', 'connector.properties.zookeeper.connect' = 'localhost:2181', 'connector.properties.bootstrap.servers' = 'localhost:9092', 'update-mode' = 'append', 'format.type' = 'json', 'format.derive-schema' = 'true' ); --???????????? select event_time_line from sourceTable ; --??????????????????????????value??????????????????????size?????????? select type_change(event_time_line) from sourceTable ; public class TypeChange extends ScalarFunction { /** * ??null??????????????????????????????????????????????????????????planner???????????????? * @param rows * @return */ public String eval(Row [] rows){ return JSONObject.toJSONString(rows); } }