FlinkKafkaConsumer API 维表关联

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

FlinkKafkaConsumer API 维表关联

郑斌斌
各位好:

请教一下,用FlinkKafkaConsumer API的话,如何支持SQL的方式,和维表关联。(之前用Kafka API&StreamTableDescriptor API是可以的)
 "select  a.id,b.name from kafka_table a "
        + "join dim_table FOR SYSTEM_TIME AS OF a.proctime as b on a.id = b.user_id";

thanks & Regards
Reply | Threaded
Open this post in threaded view
|

Re: FlinkKafkaConsumer API 维表关联

Jark
Administrator
你需要用 DDL 去声明这张 kafka 表[1], 目前不建议使用 `Kafka` 和 `StreamTableDescriptor` API。

Best,
Jark

[1]:
https://ci.apache.org/projects/flink/flink-docs-release-1.11/dev/table/connectors/kafka.html

On Thu, 16 Jul 2020 at 11:43, 郑斌斌 <[hidden email]> wrote:

> 各位好:
>
> 请教一下,用FlinkKafkaConsumer API的话,如何支持SQL的方式,和维表关联。(之前用Kafka
> API&StreamTableDescriptor API是可以的)
>  "select  a.id,b.name from kafka_table a "
>         + "join dim_table FOR SYSTEM_TIME AS OF a.proctime as b on a.id =
> b.user_id";
>
> thanks & Regards