Flink sql 实现全局row_number()分组排序

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

Flink sql 实现全局row_number()分组排序

Tian Hengyu
在做实时数仓的时候,有需求要使用flink sql实现全局的row_number(),请教下各位有啥方案吗?

目前想的是,将流进行row
number处理后存储到hbase中,然后每次处理流数据都和hbase进行关联,row_number处理后将最新结果存入hbase中,即通过对hbase的实时读写实现全局row_number().

请问以上方法可行不,,实时读hbase关联,然后在写入最新数据到hbase,效率会有问题吗,这样能满足实时的需求吗?



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

Re: Flink sql 实现全局row_number()分组排序

Tian Hengyu
咋么有人啊~~~



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

Re: Flink sql 实现全局row_number()分组排序

Kurt Young
直接 SQL Top-N 即可:
https://ci.apache.org/projects/flink/flink-docs-release-1.12/dev/table/sql/queries.html#top-n

Best,
Kurt


On Tue, Mar 16, 2021 at 3:40 PM Tian Hengyu <[hidden email]> wrote:

> 咋么有人啊~~~
>
>
>
> --
> Sent from: http://apache-flink.147419.n8.nabble.com/
>