Skip to main content

JDBC Sink Connector

Target connector

JDBC Sink Connector

JDBC Sink writes Kafka records to relational databases such as PostgreSQL, Oracle, MySQL, SQL Server, and Db2. It is the primary target connector for relational database delivery.

Parameters

CategoryParameterRequiredDescription
BasicnameYesUnique target connector name.
Basicconnector.classYesJDBC sink connector class available in Kafka Connect.
Basictasks.maxYesNumber of sink tasks. Increase only when topic partitioning and target ordering requirements allow it.
Topicstopics / topics.regexYesKafka topics consumed by the target connector.
Connectionconnection.urlYesJDBC URL for the target database.
Connectionconnection.usernameYesTarget database user.
Connectionconnection.passwordYesPassword or secret reference.
Write modeinsert.modeYesInsert behavior, commonly insert, upsert, or update depending on connector.
Write modedelete.enabledNoEnables deletes when tombstone/delete events are received.
Keysprimary.key.modeYesDefines how target primary keys are built.
Keysprimary.key.fieldsConditionalPrimary key fields when required by the selected key mode.
Schemaschema.evolution / auto.create / auto.evolveNoControls target table creation or schema changes, depending on connector vendor.
Table mappingtable.name.formatNoMaps topic names to target table names.
Runtimebatch.sizeNoBatch size for target writes.

Notes

When consuming Debezium source topics, target configuration usually needs an SMT such as ExtractNewRecordState so the sink receives the row payload instead of the full Debezium envelope.

Reference

Debezium JDBC sink connector