Flink 读 Hive 表,如何设置 TTL

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Flink 读 Hive 表,如何设置 TTL

macia kk
文档上是在 create table 的时候, 设置 lookup.join.cache.ttl

但是我现在想用 streaming kafka 的数据,join 一张已经存在的 Hive 表,怎么设置TTL?

CREATE TABLE dimension_table (
  product_id STRING,
  product_name STRING,
  unit_price DECIMAL(10, 4),
  pv_count BIGINT,
  like_count BIGINT,
  comment_count BIGINT,
  update_time TIMESTAMP(3),
  update_user STRING,
  ...) TBLPROPERTIES (
  'streaming-source.enable' = 'false',           -- option with
default value, can be ignored.
  'streaming-source.partition.include' = 'all',  -- option with
default value, can be ignored.
  'lookup.join.cache.ttl' = '12 h');