Package io.debezium.sink.naming
Class DefaultCollectionNamingStrategy
java.lang.Object
io.debezium.sink.naming.DefaultCollectionNamingStrategy
- All Implemented Interfaces:
CollectionNamingStrategy
Default implementation of the
CollectionNamingStrategy 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, rk3rn3r
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolveCollectionName(DebeziumSinkRecord record, String collectionNameFormat) Resolves the logical collection name from the Debezium sink record.private StringresolveCollectionNameBySource(DebeziumSinkRecord record, String collectionName, String collectionNameFormat)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ENVELOPE_SOURCE_FIELD_NAME
- See Also:
-
sourcePattern
-
-
Constructor Details
-
DefaultCollectionNamingStrategy
public DefaultCollectionNamingStrategy()
-
-
Method Details
-
resolveCollectionName
Description copied from interface:CollectionNamingStrategyResolves the logical collection name from the Debezium sink record.- Specified by:
resolveCollectionNamein interfaceCollectionNamingStrategy- Parameters:
record- Debezium sink record, should not benullcollectionNameFormat- the format string for the collection name (mapped from the topic name)- Returns:
- the resolved logical collection name; if
nullthe record should not be processed
-
resolveCollectionNameBySource
private String resolveCollectionNameBySource(DebeziumSinkRecord record, String collectionName, String collectionNameFormat)
-