Flink 版本 1.12.3
source是kafka 维表是MySQL source left join 维表
public class FlinkTableDemo {
public static void main(String[] args) throws Exception {
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
StreamTableEnvironment tableEnv = StreamTableEnvironment.create(env);
String sourceTable = "CREATE TABLE kafka_table " +
"( " +
" int int ," +
" age int ," +
" proctime as PROCTIME() " +
")WITH(" +
" 'connector' = 'kafka' " +
" ,'topic' = 'test' " +
" ,'properties.bootstrap.servers' = 'XXXX' " +
" ,'properties.group.id' = 'test_group_1' " +
" ,'scan.startup.mode' = 'group-offsets' " +
" ,'format' = 'canal-json' " +
")";