You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by yxy <ya...@nantian.com.cn> on 2023/05/06 07:13:57 UTC

Can flink1.15.2 use flink sql to create a broadcast table? I didn't find anything related in https://flink.apache.org/

Hello, we have a business scenario.  We have a real-time process to calculate how much red envelopes should be given to them for each transaction.  For example, if a customer pays $100, we will give him a rebate of one thousandth.  We currently use flinksql to Realize this function, but we found that flinksql cannot dynamically adjust this ratio.  We want to know can flinksql implement broadcast tables like this?  Broadcast the ratio?

Re: Can flink1.15.2 use flink sql to create a broadcast table? I didn't find anything related in https://flink.apache.org/

Posted by Shammon FY <zj...@gmail.com>.
Hi yxy,

As Hang mentioned, I think lookup join matches your requirements too. You
can refer to doc [1] to get more detailed information.

[1]
https://nightlies.apache.org/flink/flink-docs-release-1.17/docs/dev/table/sql/queries/joins/#lookup-join

Best,
Shammon FY


On Sat, May 6, 2023 at 5:54 PM Hang Ruan <ru...@gmail.com> wrote:

> Hi, yxy,
>
> I think this scenario could be resolved by a lookup join or a UDF. We can
> store the ratio in the mysql table. Then we could read it by a lookup join
> or implement a UDF to read the ratio.
>
> Best,
> Hang
>
> yxy <ya...@nantian.com.cn> 于2023年5月6日周六 15:14写道:
>
>> Hello, we have a business scenario.  We have a real-time process to
>> calculate how much red envelopes should be given to them for each
>> transaction.  For example, if a customer pays $100, we will give him a
>> rebate of one thousandth.  We currently use flinksql to Realize this
>> function, but we found that flinksql cannot dynamically adjust this ratio.
>> We want to know can flinksql implement broadcast tables like this?
>> Broadcast the ratio?
>
>

Re: Can flink1.15.2 use flink sql to create a broadcast table? I didn't find anything related in https://flink.apache.org/

Posted by Hang Ruan <ru...@gmail.com>.
Hi, yxy,

I think this scenario could be resolved by a lookup join or a UDF. We can
store the ratio in the mysql table. Then we could read it by a lookup join
or implement a UDF to read the ratio.

Best,
Hang

yxy <ya...@nantian.com.cn> 于2023年5月6日周六 15:14写道:

> Hello, we have a business scenario.  We have a real-time process to
> calculate how much red envelopes should be given to them for each
> transaction.  For example, if a customer pays $100, we will give him a
> rebate of one thousandth.  We currently use flinksql to Realize this
> function, but we found that flinksql cannot dynamically adjust this ratio.
> We want to know can flinksql implement broadcast tables like this?
> Broadcast the ratio?