Class DefaultTableNamingStrategy
java.lang.Object
io.debezium.connector.jdbc.naming.DefaultTableNamingStrategy
- All Implemented Interfaces:
TableNamingStrategy
Default implementation of the
TableNamingStrategy where the table name is driven
directly from the topic name, replacing any dot characters with underscore
and source field in topic.- Author:
- Chris Cranford
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanisTombstone(org.apache.kafka.connect.sink.SinkRecord record) resolveTableName(JdbcSinkConnectorConfig config, org.apache.kafka.connect.sink.SinkRecord record) Resolves the logical table name from the sink record.private StringresolveTableNameBySource(JdbcSinkConnectorConfig config, org.apache.kafka.connect.sink.SinkRecord record, String tableFormat)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
sourcePattern
-
-
Constructor Details
-
DefaultTableNamingStrategy
public DefaultTableNamingStrategy()
-
-
Method Details
-
resolveTableName
public String resolveTableName(JdbcSinkConnectorConfig config, org.apache.kafka.connect.sink.SinkRecord record) Description copied from interface:TableNamingStrategyResolves the logical table name from the sink record.- Specified by:
resolveTableNamein interfaceTableNamingStrategy- Parameters:
config- sink connector configuration, should not benullrecord- Kafka sink record, should not benull- Returns:
- the resolved logical table name; if
nullthe record should not be processed
-
resolveTableNameBySource
private String resolveTableNameBySource(JdbcSinkConnectorConfig config, org.apache.kafka.connect.sink.SinkRecord record, String tableFormat) -
isTombstone
private boolean isTombstone(org.apache.kafka.connect.sink.SinkRecord record)
-