流与流 left join

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

流与流 left join

chenchencc
我们现在场景有两个流join,A流left joinB流,A流比B流晚到,而且最晚比B流晚到3小时,用flink sql有啥方法实现吗?
Reply | Threaded
Open this post in threaded view
|

Re: 流与流 left join

jinghuiwang
sql可以定义cep,捕获匹配流和超时流

发自我的iPhone

> 在 2021年5月27日,下午7:40,流弊 <[hidden email]> 写道:
>
> 我们现在场景有两个流join,A流left joinB流,A流比B流晚到,而且最晚比B流晚到3小时,用flink sql有啥方法实现吗?
Reply | Threaded
Open this post in threaded view
|

Re: 流与流 left join

chenchencc
好的,谢谢。
想问下如果使用普通sql有啥其他方式吗。如果定义版本维度表可以吗



--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: 流与流 left join

chenchencc
In reply to this post by jinghuiwang
想问下cep sql批处理能使用吗?想流批一体的。



--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: 流与流 left join

JasonLee
In reply to this post by chenchencc
Hi
可以看下 interval join 是否能满足你的需求



-----
Best Wishes
JasonLee
--
Sent from: http://apache-flink.147419.n8.nabble.com/
Best Wishes
JasonLee
Reply | Threaded
Open this post in threaded view
|

Re: 流与流 left join

Shuo Cheng
In reply to this post by chenchencc
我理解双流 Join 就能满足需求吧, 缺点是数据全量放 state,只能靠 state ttl 来清理数据

On 5/27/21, chenchencc <[hidden email]> wrote:
> 想问下cep sql批处理能使用吗?想流批一体的。
>
>
>
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/
>
Reply | Threaded
Open this post in threaded view
|

Re: 流与流 left join

chenchencc
In reply to this post by JasonLee
恩恩,是可以的
,但是有些缺点
1.B表本身是维表属性,inter join B表如果有重复数据,会造成数据冗余
2.inter join 会有大量多余state数据



--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: 流与流 left join

chenchencc
In reply to this post by Shuo Cheng
恩恩,单表table 有什么方式能设置ttl吗?



--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: 流与流 left join

Shuo Cheng
state ttl 只能是全局算子维度, table.exec.state.ttl



--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: 流与流 left join

LakeShen
Hi,或许 Flink SQL  interval join 能够满足你的需求。

Best,
LakeShen.

Shuo Cheng <[hidden email]> 于2021年5月31日周一 下午12:10写道:

> state ttl 只能是全局算子维度, table.exec.state.ttl
>
>
>
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/
>
Reply | Threaded
Open this post in threaded view
|

Re: 流与流 left join

chenchencc
In reply to this post by jinghuiwang
你好,谢谢哈,想问下有相关的资料或者案例能发下吗?



--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: 流与流 left join

chenchencc
In reply to this post by jinghuiwang
你好,想问下有什么案例或者资料吗



--
Sent from: http://apache-flink.147419.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: 流与流 left join

liujiangang
In reply to this post by chenchencc
https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/dev/table/sql/queries/joins/#interval-joins

chenchencc <[hidden email]> 于2021年6月15日周二 上午9:46写道:

> 你好,谢谢哈,想问下有相关的资料或者案例能发下吗?
>
>
>
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/