开发者社区 > 大数据与机器学习 > 正文

向大佬们请教一个问题,FLInk 1.16版本中 维表缓存的用法,目前我这边遇到维表ttl后不会?

向大佬们请教一个问题,FLInk 1.16版本中 维表缓存的用法,目前我这边遇到维表ttl后不会更新数据问题

CREATE TABLE order_device_info_source (

order_id              BIGINT, 
consume_date          TIMESTAMP(0),
upload_date           TIMESTAMP(0),
up_status_id          INT,
consume_money         INT,
project_id           BIGINT,   
PRIMARY KEY (order_id, consume_date) NOT ENFORCED

) WITH ( 'connector' = 'mysql-cdc', 'server-id' = '5591', 'hostname' = '127.0.0.1:3306', 'port' = '3306', 'username' = 'root', 'password' = '123456', 'database-name' = 'wit_order', 'table-name' = 'order_[0-9]+', 'scan.snapshot.fetch.size' = '5000', 'scan.startup.mode' = 'latest-offset' );

CREATE TEMPORARY TABLE project_info_lookup ( project_id bigint, project_name VARCHAR, tenant_id bigint, PRIMARY KEY (project_id) NOT ENFORCED ) WITH ( 'connector' = 'jdbc', 'driver' = 'com.mysql.cj.jdbc.Driver', 'url' = 'jdbc:mysql://127.0.0.1:3306/project', 'username' = 'root', 'password' = '123456', 'table-name' = 'project_info', 'lookup.cache.max-rows' = '5000', 'lookup.cache.ttl' = '60 s' );

SELECT o.order_id,o.consume_date,o.consume_money,p.project_id,p.project_name LEFT JOIN project_info_lookup AS p ON p.project_id = oa.projectId;单独SELECT project_info_lookup 维表会更新 但是join后 维表 lookup.cache.ttl 好像未生效 ,在project_info发生改变,且lookup.cache.ttl时间过了,project_info_lookup还是以前的数据

展开
收起
真的很搞笑 2023-05-22 18:49:04 208 0
0 条回答
写回答
取消 提交回答

大数据领域前沿技术分享与交流,这里不止有技术干货、学习心得、企业实践、社区活动,还有未来。

相关产品

  • 实时计算 Flink版
  • 相关电子书

    更多
    基于英特尔 SSD 的虚拟机缓存解决SSD 立即下载
    用户态高速块缓存方案 立即下载
    高性能Web架构之缓存体系 立即下载