中电科金仓KFS支持DDL过滤功能配置与说明

关键字:

中电科金仓、KingbaseFlySync、KFS、同步程序、replicator、数据同步、数据解析、增量同步、实时同步、DDL过滤、create语句过滤、alter语句过滤、drop语句过滤、truncate语句过滤

1.功能描述

实时同步支持过滤所有的DDL语句。

2.使用场景

支持DDL同步的数据源,KFS解析DDL语句。在特定场景下,用户希望不同步DDL语句,该过滤器可以实现不解析增量数据中的DDL语句。

3.配置使用方式介绍

需要在源端同步服务配置文件flysync.ini中添加对应的过滤参数,具体配置参数如下所示:

svc_extractor_filters=dropstatementdata

4.使用示例

4.1前置条件

1)完成安装KFS同步程序前的环境准备;
2)源端、目标端数据库含有以下表结构及数据:

create table test1.table1(id int);
create table test1.table2(id int);
create table test1.table3(id int);
insert into test1.table1 values(10011);
insert into test1.table1 values(10012);
insert into test1.table2 values(10021);
insert into test1.table2 values(10022);
insert into test1.table3 values(10031);
insert into test1.table3 values(10032);

4.2未配置情况

1)安装同步程序并启动。具体的安装步骤参见《Kingbase FlySync 安装部署手册》
2)在源端数据库执行

create table test1.table4(id int);
alter table test1.table1 add column new_id int;
drop table test1.table2;
truncate table test1.table3;

查看kufl,可以看出DDL语句全部解析
图片.png

查看目标端数据库,可以看出DDL全部入库
图片.png

4.3配置操作步骤

1)源端配置flysync.ini文件,在源端的flysync.ini中添加以下参数

[default]
...
[m_service]
...
# 添加过滤全部DDL的过滤器
svc-extractor-filters=dropstatementdata

2)安装同步程序并启动。具体的安装步骤参见《Kingbase FlySync 安装部署手册》
3)在源端数据库执行以下操作

create table test1.table4(id int);
alter table test1.table1 add column new_id int;
drop table test1.table2;
truncate table test1.table3;

查看源端数据库,可以看出所有DDL语句执行成功
图片.png
查看kufl,可以看出DDL语句全部未解析
图片.png
查看目标端数据库,所有DDL操作都过滤掉了
图片.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值