Class KafkaTableProvider

java.lang.Object
org.apache.beam.sdk.extensions.sql.meta.provider.InMemoryMetaTableProvider
org.apache.beam.sdk.extensions.sql.meta.provider.kafka.KafkaTableProvider
All Implemented Interfaces:
TableProvider

@AutoService(TableProvider.class) public class KafkaTableProvider extends InMemoryMetaTableProvider
Kafka table provider.

A sample of text table is:


 CREATE TABLE ORDERS(
   ID INT COMMENT 'this is the primary key',
   NAME VARCHAR(127) COMMENT 'this is the name'
 )
 COMMENT 'this is the table orders'
 TYPE kafka
 // Optional. One broker host:port pair to bootstrap with and a topic.
 // Only one topic overall may be provided for writing.
 LOCATION 'my.company.url.com:2181/topic1'
 // Extra bootstrap_servers and topics can be provided explicitly. These will be merged
 // with the server and topic in LOCATION.
 TBLPROPERTIES '{
   "bootstrap_servers": ["104.126.7.88:7743", "104.111.9.22:7743"],
   "topics": ["topic2", "topic3"]
 }'
 
  • Constructor Details

    • KafkaTableProvider

      public KafkaTableProvider()
  • Method Details

    • buildBeamSqlTable

      public BeamSqlTable buildBeamSqlTable(Table table)
      Description copied from interface: TableProvider
      Build a BeamSqlTable using the given table meta info.
    • getTableType

      public String getTableType()
      Description copied from interface: TableProvider
      Gets the table type this provider handles.