You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-zh@flink.apache.org by 奔跑的小飞袁 <s_...@126.com> on 2020/10/28 08:06:39 UTC

flinkSQL针对join操作设置不同窗口

hello
我们这有一种业务场景是关于两个动态表的join,其中一张表是完全的动态表,去关联另一张动态表中当天的数据,请问这种情况的下join场景支持吗



--
Sent from: http://apache-flink.147419.n8.nabble.com/

Re:flinkSQL针对join操作设置不同窗口

Posted by hailongwang <18...@163.com>.
Hi s_hongliang,
1、如果用 DataStream API 的话,可以需要使用 State 对需要被关联的表进行存储,并且设置 TTL。
2、如果使用 SQL 的话:
2.1、可以将需要被关联的数据存入Hbase 或者 Mysql,然后保证只有当天的数据,在 SQL 中使用 Temporal Table[1] 关联。
2.2、使用 temporal-table-function[2] ,设置StateRetentionTime同时过滤掉关联上昨天的数据。
[1] https://ci.apache.org/projects/flink/flink-docs-master/dev/table/streaming/temporal_tables.html#temporal-table
[2] https://ci.apache.org/projects/flink/flink-docs-master/dev/table/streaming/temporal_tables.html#temporal-table-function




Best,
Hailong Wang
在 2020-10-28 15:06:39,"奔跑的小飞袁" <s_...@126.com> 写道:
>hello
>我们这有一种业务场景是关于两个动态表的join,其中一张表是完全的动态表,去关联另一张动态表中当天的数据,请问这种情况的下join场景支持吗
>
>
>
>--
>Sent from: http://apache-flink.147419.n8.nabble.com/