Package org.apache.calcite.adapter.kafka
Interface KafkaRowConverter<K,V>
- Type Parameters:
K
- type for Kafka message key, refer toConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG
;V
- type for Kafka message value, refer toConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG
;
- All Known Implementing Classes:
KafkaRowConverterImpl
public interface KafkaRowConverter<K,V>
Interface to handle formatting between Kafka message and Calcite row.
-
Method Summary
Modifier and TypeMethodDescriptionrowDataType
(String topicName) Generates the row type for a given Kafka topic.Object[]
Parses and reformats a Kafka message from the consumer, to align with row type defined asrowDataType(String)
.
-
Method Details
-
rowDataType
Generates the row type for a given Kafka topic.- Parameters:
topicName
- Kafka topic name- Returns:
- row type
-
toRow
Parses and reformats a Kafka message from the consumer, to align with row type defined asrowDataType(String)
.- Parameters:
message
- Raw Kafka message record- Returns:
- fields in the row
-