Flink SQL支持createTemporaryView吗?谢谢

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Flink SQL支持createTemporaryView吗?谢谢

Appleyuchi
您好!
我想把下面的代码转化为纯SQL,
然后在Flink SQL Client中运行,
但是其中一部分的转化我遇到了困难,如下:


DataStream<Row>ds=tEnv.toRetractStream(group,Row.class).flatMap(newFlatMapFunction<Tuple2<Boolean,Row>,Row>(){@OverridepublicvoidflatMap(Tuple2<Boolean,Row>value,Collector<Row>collect)throwsException{collect.collect(value.f1);}}).returns(Types.ROW(Types.STRING,Types.LONG));//给Table增加proctime字段,ts可以随便改成别的你喜欢的名字Tabletable=tEnv.fromDataStream(ds,"behavior,count_unique_user,ts.proctime");//建立视图,保留临时表tEnv.createTemporaryView("group_by_view",table);


请问应该如何转化?
或者Flink SQL Client当前并不支持上述代码转化为纯粹的SQL?


谢谢您


完整代码是:
https://paste.ubuntu.com/p/7rthRcjtc7/