Sql Server connector issue with snapshot.mode:schema_only

341 views
Skip to first unread message

Diego Olguin

unread,
Mar 23, 2023, 8:23:18 AM3/23/23
to debezium
Hello everyone

I have a problem with the connector to SQL Server with the configuration "snapshot.mode": "schema_only", the data topics are not created and the information is not replicated to Kafka. Only one topic was created with the name of the server and there are no errors in the logs.

Previously I tried setting "snapshot.mode": "initial" and it worked fine, but I don't require all the old information from the database. (more than 300GB of data)

The configuration is the following:

{
"connector.class": "io.debezium.connector.sqlserver.SqlServerConnector",
"tasks.max": "1",
"transforms": "unwrap",
"include.schema.changes": "true",
"topic.prefix": "serv3db",
"schema.history.internal.kafka.topic": "schema-changes1.mydb",
"snapshot.new.tables": "parallel",
"transforms.unwrap.drop.tombstones": "false",
"database.history.skip.unparseable.ddl": "true",
"transforms.unwrap.type": "io.debezium.transforms.ExtractNewRecordState",
"value.converter": "io.confluent.connect.avro.AvroConverter",
"key.converter": "io.confluent.connect.avro.AvroConverter",
"database.allowPublicKeyRetrieval": "true",
"database.encrypt": "false",
"database.dbname": "myDB",
"database.user": "kafka",
"database.names": "myDB",
"time.precision.mode": "connect",
"database.server.name": "serv3db",
"schema.history.internal.kafka.bootstrap.servers": "192.168.101.20:30842",
"database.port": "1433",
"value.converter.schema.registry.url": "http://192.168.101.20:32609",
"table.exclude.list": "dbo.TEST_Documents,dbo.TEST_JOBS",
"database.hostname": "192.168.100.49",
"database.password": "******",
"name": "mssql-source-connector-mydb1",
"key.converter.schema.registry.url": "http://192.168.101.20:32609",
"snapshot.mode": "schema_only"
}

Do I have to make any changes in the configuration so that it replicates the current information and not all?

The version of the connector is 2.0.1.Final .

Thanks




Chris Cranford

unread,
Mar 23, 2023, 1:48:18 PM3/23/23
to debe...@googlegroups.com
Hi Diego -

When you use "schema_only", the table-level topics won't be created until a change actually occurs on that table.  The only topics you'll see created up-front will be the database history topics you've described.

Hope that helps.
Chris
--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/c2b1f18b-539b-4cd7-804f-09b5e76654f2n%40googlegroups.com.

Diego Olguin

unread,
Mar 23, 2023, 1:54:40 PM3/23/23
to debezium
Hi Chris

Several changes were made after creating the connector (inserts, updates), but the topics were not created.

I used a similar configuration for other connectors to MySql and I didn't have that problem.

Chris Cranford

unread,
Mar 23, 2023, 2:06:41 PM3/23/23
to debe...@googlegroups.com
Hi Diego -

I would suggest sharing the logs or looking to see if there are any WARN/ERROR messages in the logs. Did you properly set up SQL Server's CDC for these tables according to the documentation?

Thanks,
Chris
Reply all
Reply to author
Forward
0 new messages