pg测试表
create sequence public.add1byself INCREMENT BY 1 MINVALUE 1 START WITH 1;
create table public.tb3
(
id int not null default nextval( 'public.add1byself' ) primary key,
name varchar(20),
update_sj timestamp(0)
);
--搞几条数据
insert into tb3 (name, update_sj) values ( 'shanghai', now() );
clickhouse测试表
create table tb5
(
id UInt64,
name String default '',
gxsj DateTime default '0000-00-00 00:00:00'
)
engine = MergeTree PARTITION BY toYYYYMMDD(gxsj)
ORDER BY gxsj
SETTINGS index_granularity = 8192;
kettle
先把连接建起来
再建一个转换,需要两个表输入,一个 “插入/更新”
第一个表输入这么填:
第二个表输入这么填:
第三个 插入/更新 这么填:
然后运行,就可以看到效果了,clickhouse里有数据进去了。
因为clickhouse没有更新操作,所以只要是时间大于ck的,都应该进去。