JDBC Sink Connectors
oracdc includes two sink connectors optimized for delivering data from Kafka topics to PostgreSQL or Oracle Database.
JdbcSinkConnector
Class: solutions.a2.kafka.sink.JdbcSinkConnector
The primary sink connector for delivering CDC data to a target database.
Key Parameters
| Parameter | Type | Description |
|---|---|---|
a2.jdbc.url | String | JDBC connection URL for the target database |
a2.jdbc.username | String | JDBC connection username |
a2.jdbc.password | String | JDBC connection password |
a2.autocreate | Boolean | When true, creates missing tables automatically. Default: false |
a2.batch.size | Integer | Maximum number of rows per batch. Default: 1000 |
a2.connection.init.sql | String | SQL statement(s) executed for all new connections |
a2.table.mapper | String | Class for mapping topic names to table names |
a2.table.name.prefix | String | Prefix added to target table names |
a2.table.name.suffix | String | Suffix added to target table names |
a2.pk.string.length | Integer | String length for primary key columns |
Schema Evolution
The sink connector supports schema evolution, automatically adapting to changes in the source schema.
WrappedDataJdbcSinkConnector
Class: solutions.a2.kafka.sink.WrappedDataJdbcSinkConnector
Used when consuming data in the wrapped format produced by oracdc when a2.supplemental.logging=NONE. Accepts the same parameters as JdbcSinkConnector.