我通过表环境执行insert into语句提交作业,我该如何设置我的job名称呢?
程序: EnvironmentSettings bbSettings = EnvironmentSettings.newInstance().useBlinkPlanner().build(); TableEnvironment bsTableEnv = TableEnvironment.create(bbSettings);
String sourceDDL = "CREATE TABLE datagen ( " + " f_random INT, " + " f_random_str STRING, " + " ts AS localtimestamp, " + " WATERMARK FOR ts AS ts " + ") WITH ( " + " 'connector' = 'datagen', " + " 'rows-per-second'='10', " + " 'fields.f_random.min'='1', " + " 'fields.f_random.max'='5', " + " 'fields.f_random_str.length'='10' " + ")";
bsTableEnv.executeSql(sourceDDL); Table datagen = bsTableEnv.from("datagen");
System.out.println(datagen.getSchema());
String sinkDDL = "CREATE TABLE print_table (" + " f_random int," + " c_val bigint, " + " wStart TIMESTAMP(3) " + ") WITH ('connector' = 'print') "; bsTableEnv.executeSql(sinkDDL);
System.out.println(bsTableEnv.from("print_table").getSchema());
Table table = bsTableEnv.sqlQuery("select f_random, count(f_random_str), TUMBLE_START(ts, INTERVAL '5' second) as wStart from datagen group by TUMBLE(ts, INTERVAL '5' second), f_random"); bsTableEnv.executeSql("insert into print_table select * from " + table);
*来自志愿者整理的flink邮件归档
YI: 有一个issue[1] 正在跟进和解决这个问题
[1] https://issues.apache.org/jira/browse/FLINK-18545*来自志愿者整理的flink
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。