본문 바로가기

Open Source/Kafka

Kafaka Source Connector 특정 Table만 snapshot뜨기

Source Connector Configuration에서 아래의 요소만 추가해 주면 된다. 테이블은 콤마 구분자로 여러개 등록 할수 있다.

"table.whitelist": "customer",

{
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"database.user": "UserName",
"database.dbname": "postgres",
"slot.name": "slot1",
"database.server.name": "postgre_source",
"plugin.name": "pgoutput",
"value.converter.schema.registry.url": "http://schema-registry:8081",
"database.hostname": "172.18.0.11",
"database.password": "******",
"name": "Postgre Source Connector2",
"value.converter": "io.confluent.connect.avro.AvroConverter",
"key.converter": "io.confluent.connect.avro.AvroConverter",
"key.converter.schema.registry.url": "http://schema-registry:8081",

"table.whitelist": "public.customer" // 특정 테이블만 snapshot 할때는 추가
}