Interface KafkaRowConverter<K,​V>

  • Type Parameters:
    K - type for Kafka message key, refer to ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG;
    V - type for Kafka message value, refer to ConsumerConfig.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 Detail

      • rowDataType

        RelDataType rowDataType​(java.lang.String topicName)
        Generates row type for a given Kafka topic.
        Parameters:
        topicName - , Kafka topic name;
        Returns:
        row type
      • toRow

        java.lang.Object[] toRow​(org.apache.kafka.clients.consumer.ConsumerRecord<K,​V> message)
        Parses and reformats Kafka message from consumer, to align with row type defined as rowDataType(String).
        Parameters:
        message - , the raw Kafka message record;
        Returns:
        fields in the row