Hi 明文, 目前 HiveTableSink 不支持流式写入(未实现 AppendStreamTableSink)。你可以将执行模式改成 batch 模式,就可以运行了。
SET execution.type=batch; Best, Jark On Sun, 16 Feb 2020 at 15:36, 潘明文 <[email protected]> wrote: > > > HI , > HiveTableSink正对HIVE 种创建的表可以是吗? 但我用HIVE 创建表的(表是在HIVE 中创建的),FLINK SQL > 中直接使用HIVE 表 > Flink SQL> INSERT INTO hive_test select '11'; > [INFO] Submitting SQL update statement to the cluster... > [ERROR] Could not execute SQL statement. Reason: > org.apache.flink.table.api.TableException: Stream Tables can only be > emitted by AppendStreamTableSink, RetractStreamTableSink, or > UpsertStreamTableSink. > Flink SQL> INSERT overwrite hive_test select '11'; > [INFO] Submitting SQL update statement to the cluster... > [ERROR] Could not execute SQL statement. Reason: > org.apache.flink.table.api.TableException: Stream Tables can only be > emitted by AppendStreamTableSink, RetractStreamTableSink, or > UpsertStreamTableSink. > > > > > > > > > 在 2020-02-16 09:27:29,"Benchao Li" <[email protected]> 写道: > >Hi 明文, > > > >现在insert overwrite应该是只支持HiveTableSink。所以如果你不是HiveTableSink的话,可以直接用“insert > >into ..."就可以了。 > > > >潘明文 <[email protected]> 于2020年2月16日周日 上午8:38写道: > > > >> 您好, > >> sql 出现以下错误,是什么原因造成的呀? > >> > >> > >> Flink SQL> insert overwrite pmw select '1'; > >> [INFO] Submitting SQL update statement to the cluster... > >> [ERROR] Could not execute SQL statement. Reason: > >> org.apache.flink.table.api.TableException: Stream Tables can only be > >> emitted by AppendStreamTableSink, RetractStreamTableSink, or > >> UpsertStreamTableSink. > > > > > > > >-- > > > >Benchao Li > >School of Electronics Engineering and Computer Science, Peking University > >Tel:+86-15650713730 > >Email: [email protected]; [email protected] >
