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 Zhou Zach <wa...@163.com> on 2020/06/15 02:51:39 UTC

flink sql DDL支持 Temporal Table 定义吗

根据文档https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/table/streaming/joins.html#join-with-a-temporal-table,
临时表table source 必须要继承LookupableTableSource,
但是,看到https://ci.apache.org/projects/flink/flink-docs-release-1.10/dev/table/connect.html#jdbc-connector


-- lookup options, optional, used in temporary join'connector.lookup.cache.max-rows'='5000',-- optional, max number of rows of lookup cache, over this value, the oldest rows will-- be eliminated. "cache.max-rows" and "cache.ttl" options must all be specified if any-- of them is specified. Cache is not enabled as default.'connector.lookup.cache.ttl'='10s',-- optional, the max time to live for each rows in lookup cache, over this time, the oldest rows-- will be expired. "cache.max-rows" and "cache.ttl" options must all be specified if any of-- them is specified. Cache is not enabled as default.'connector.lookup.max-retries'='3',-- optional, max retry times if lookup database failed


是不是说在flink sql JDBC Connector DDL中,加上这三个配置项,那么创建的表就是Temporal Table,可以在temporary join 中使用?




Re: flink sql DDL支持 Temporal Table 定义吗

Posted by Leonard Xu <xb...@gmail.com>.

> 在 2020年6月15日,10:51,Zhou Zach <wa...@163.com> 写道:
> 
> 是不是说在flink sql JDBC Connector DDL中,加上这三个配置项,那么创建的表就是Temporal Table,可以在temporary join 中使用?

Hello

这三个参数是optional的,只是lookup cache的参数,通过配置这三个参数,在做维表jion时可以在性能和维表更新实效性之间进行配置,并不是配置了这三个参数就是维表。因为JDBCSource实现了LookUpSource 接口, 同时也实现了StreamTableSource 接口, 所以JDBC的表即可以作为维表也可以作为普通的源表,具体看你query中如何使用。

Best,
Leonard Xu