- 场景
OGG中同步Oracle表到Kafka,有些Oracle表有主键,有些没主键,对于没主键的表怎么给表自定义加主键
- 解决
- Extract 进程
extract etest10
GETUPDATEBEFORES
NOCOMPRESSDELETES
NOCOMPRESSUPDATES
TranlogOptions DBLOGREADER
userid ogg_admin, password ogg_admin
exttrail /ogg/dirdat/th
table DBUS.TESTP5;
table DBUS.TESTP6,tokens(zeta_row_id= @GETENV('RECORD',' ROWID'));
table DBUS.TESTP7;
- Pump进程
extract ptest10
passthru
userid ogg_admin, password ogg_admin
rmthost 10.10.10.206, mgrport 7890
rmttrail /ogg/dirdat/th
table DBUS.TESTP5;
table DBUS.TESTP6,tokens(zeta_row_id= @GETENV('RECORD', 'ROWID'));
table DBUS.TESTP7;
- kafka.props
###添加下面一行
gg.handler.kafkahandler.includeTokens=true
- 结果
- 有主键