Class TimescaleDb<R extends org.apache.kafka.connect.connector.ConnectRecord<R>>
java.lang.Object
io.debezium.connector.postgresql.transforms.timescaledb.TimescaleDb<R>
- Type Parameters:
R-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.kafka.common.Configurable,org.apache.kafka.connect.components.Versioned,org.apache.kafka.connect.transforms.Transformation<R>
public class TimescaleDb<R extends org.apache.kafka.connect.connector.ConnectRecord<R>>
extends Object
implements org.apache.kafka.connect.transforms.Transformation<R>, org.apache.kafka.connect.components.Versioned
Single message transform that modifies records coming from TimescaleDB.
It operates on chunks and aggregate's materialized hypertables.
- chunk source info block and topic name is replaced with appropriate hypertable name
- chunks belonging to hypertables acting as materialized aggregates have topic name and source info block updated with aggregate name
- headers are added with original chunk schema/table name and for aggregates with original materialized hypertable schema/table name
- Author:
- Jiri Pechanec
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringprivate static final org.slf4j.Loggerprivate TimescaleDbMetadataprivate SmtManager<R> private String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.kafka.connect.header.HeadersaddHeaders(org.apache.kafka.connect.header.Headers headers, TableId chunkId, TableId hypertableId, Optional<TableId> aggregateId) voidclose()org.apache.kafka.common.config.ConfigDefconfig()voidprivate StringgetNewTopicName(TableId newId) (package private) voidsetMetadata(TimescaleDbMetadata metadata) version()
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
HEADER_CHUNK_TABLE
- See Also:
-
HEADER_CHUNK_SCHEMA
- See Also:
-
HEADER_HYPERTABLE_TABLE
- See Also:
-
HEADER_HYPERTABLE_SCHEMA
- See Also:
-
smtManager
-
metadata
-
topicPrefix
-
-
Constructor Details
-
TimescaleDb
public TimescaleDb()
-
-
Method Details
-
configure
- Specified by:
configurein interfaceorg.apache.kafka.common.Configurable
-
apply
-
getNewTopicName
-
addHeaders
-
config
public org.apache.kafka.common.config.ConfigDef config() -
close
public void close() -
version
- Specified by:
versionin interfaceorg.apache.kafka.connect.components.Versioned
-
setMetadata
-