flink1.9 Blink planner create view 问题

classic Classic list List threaded Threaded
2 messages Options
hb
Reply | Threaded
Open this post in threaded view
|

flink1.9 Blink planner create view 问题

hb
注册了T表后,创建view报错
 tEnv.sqlUpdate(s"create view v1 as select * from T")
Exception in thread "main" org.apache.flink.table.api.TableException: Unsupported node type SqlCreateView


是用错方法了,还是不支持

Reply | Threaded
Open this post in threaded view
|

Re: flink1.9 Blink planner create view 问题

Jark
Administrator
1.9 还不支持 create view 语法。如果要注册一个 view,可以通过下面的办法:

Table table = tEnv.sqlQuery(“select * from T”)
tEnv.registerTable(“v1”, table);

然后你就可以在之后的sql 中直接查询 v1了

Best,
Jark


> 在 2019年8月28日,11:39,hb <[hidden email]> 写道:
>
>