报错 信息明确说了只支持insert air23 <wangfei23_...@163.com> 于2021年3月30日周二 上午10:32写道:
> 你好 参考官网 > https://ci.apache.org/projects/flink/flink-docs-release-1.12/zh/dev/table/connectors/jdbc.html > 这边读取mysql jdbc数据报错Exception in thread "main" > org.apache.flink.table.api.TableException: Only insert statement is > supported now. > > > String a = "-- register a MySQL table 'users' in Flink SQL\n" + > "CREATE TABLE MyUserTable (\n" + > " id BIGINT\n" + > ") WITH (\n" + > " 'connector' = 'jdbc',\n" + > " 'url' = 'jdbc:mysql://***:3306/monitor',\n" + > " 'table-name' = 't1',\n" + > " 'username' = 'root',\n" + > " 'password' = '***'\n" + > ") "; > > String b ="-- scan data from the JDBC table\n" + > "SELECT id FROM MyUserTable\n"; > > tEnv.executeSql(a); > > > > 请问是不可以从mysql读取数据吗? > > > > >