Hi 明文,

第一个问题,请问你的 pmw 是什么表呢? 需要检查下其 TableSink 没有实现 AppendStreamTableSink,
RetractStreamTableSink, or UpsertStreamTableSink 任意一个接口。
第二个问题,如果要支持 insert overwrite,需要对应的 TableSink 实现  OverwritableTableSink 接口。
目前 CsvTableSink 没有实现这个接口。


Best,
Jark




On Sun, 16 Feb 2020 at 09:27, Benchao Li <[email protected]> wrote:

> 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]
>

回复