JDBC SOURCE AND SINK
To use this connector, specify the name of the connector class in the connector.class configuration property.
connector.class
connector.class=io.confluent.connect.jdbc.JdbcSinkConnector
Connector-specific configuration properties are described below.
In the connector configuration you will notice there are no security parameters. This is because SSL is not part of the JDBC standard and will depend on the JDBC driver in use. In general, you will need to configure SSL via the connection.url parameter. For example, with MySQL it would look like:
connection.url
connection.url="jdbc:mysql://127.0.0.1:3306/sample?verifyServerCertificate=false&useSSL=true&requireSSL=true"
Please check with your specific JDBC driver documentation on support and configuration.
JDBC connection URL.
For example: jdbc:oracle:thin:@localhost:1521:orclpdb1, jdbc:mysql://localhost/db_name, jdbc:sqlserver://localhost;instance=SQLEXPRESS;databaseName=db_name
jdbc:oracle:thin:@localhost:1521:orclpdb1
jdbc:mysql://localhost/db_name
jdbc:sqlserver://localhost;instance=SQLEXPRESS;databaseName=db_name
connection.user
JDBC connection user.
connection.password
JDBC connection password.
dialect.name
The name of the database dialect that should be used for this connector. By default this is empty, and the connector automatically determines the dialect based upon the JDBC connection URL. Use this if you want to override that behavior and use a specific dialect. All properly-packaged dialects in the JDBC connector plugin can be used.
insert.mode
The insertion mode to use. Supported modes are:
insert
INSERT
upsert
INSERT OR IGNORE
update
UPDATE
batch.size
Specifies how many records to attempt to batch together for insertion into the destination table, when possible.
delete.enabled
Whether to treat null record values as deletes. Requires pk.mode to be record_key.
null
pk.mode
record_key
table.name.format
A format string for the destination table name, which may contain ‘${topic}’ as a placeholder for the originating topic name.
For example, kafka_${topic} for the topic ‘orders’ will map to the table name ‘kafka_orders’.
kafka_${topic}
The primary key mode, also refer to pk.fields documentation for interplay. Supported modes are:
pk.fields
none
kafka
record_value
List of comma-separated primary key field names. The runtime interpretation of this config depends on the pk.mode:
__connect_topic,__connect_partition,__connect_offset
fields.whitelist
List of comma-separated record value field names. If empty, all fields from the record value are utilized, otherwise used to filter to the desired fields.
Note that pk.fields is applied independently in the context of which field(s) form the primary key columns in the destination database, while this configuration is applicable for the other columns.
db.timezone
Name of the JDBC timezone that should be used in the connector when inserting time-based values. Defaults to UTC.
auto.create
Whether to automatically create the destination table based on record schema if it is found to be missing by issuing CREATE.
CREATE
auto.evolve
Whether to automatically add columns in the table schema when found to be missing relative to the record schema by issuing ALTER.
ALTER
quote.sql.identifiers
When to quote table names, column names, and other identifiers in SQL statements. For backward compatibility, the default is always.
always
max.retries
The maximum number of times to retry on errors before failing the task.
retry.backoff.ms
The time in milliseconds to wait following an error before a retry attempt is made.