Class DefaultTableNamingStrategy

java.lang.Object
io.debezium.connector.jdbc.naming.DefaultTableNamingStrategy
All Implemented Interfaces:
TableNamingStrategy

public class DefaultTableNamingStrategy extends Object implements 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 Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • sourcePattern

      private final Pattern 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: TableNamingStrategy
      Resolves the logical table name from the sink record.
      Specified by:
      resolveTableName in interface TableNamingStrategy
      Parameters:
      config - sink connector configuration, should not be null
      record - Kafka sink record, should not be null
      Returns:
      the resolved logical table name; if null the 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)