Class ConnectorCatalogTable<T1,T2>

java.lang.Object
org.apache.flink.table.catalog.AbstractCatalogTable
org.apache.flink.table.catalog.ConnectorCatalogTable<T1,T2>
Type Parameters:
T1 - type of the produced elements by the TableSource
T2 - type of the expected elements by the TableSink
All Implemented Interfaces:
org.apache.flink.table.catalog.CatalogBaseTable, org.apache.flink.table.catalog.CatalogTable

@Internal public class ConnectorCatalogTable<T1,T2> extends AbstractCatalogTable
A CatalogTable that wraps a TableSource and/or TableSink. This allows registering those in a Catalog. It can not be persisted as the source and/or sink might be inline implementations and not be representable in a property based form.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.flink.table.catalog.CatalogBaseTable

    org.apache.flink.table.catalog.CatalogBaseTable.TableKind

    Nested classes/interfaces inherited from interface org.apache.flink.table.catalog.CatalogTable

    org.apache.flink.table.catalog.CatalogTable.Builder
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ConnectorCatalogTable(org.apache.flink.table.legacy.sources.TableSource<T1> tableSource, org.apache.flink.table.legacy.sinks.TableSink<T2> tableSink, org.apache.flink.table.legacy.api.TableSchema tableSchema, boolean isBatch)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T1> org.apache.flink.table.legacy.api.TableSchema
    calculateSourceSchema(org.apache.flink.table.legacy.sources.TableSource<T1> source, boolean isBatch)
     
    org.apache.flink.table.catalog.CatalogBaseTable
     
    org.apache.flink.table.catalog.CatalogTable
    copy(Map<String,String> options)
     
     
     
    Optional<org.apache.flink.table.legacy.sinks.TableSink<T2>>
     
    Optional<org.apache.flink.table.legacy.sources.TableSource<T1>>
     
    boolean
     
    static <T2> ConnectorCatalogTable<?,T2>
    sink(org.apache.flink.table.legacy.sinks.TableSink<T2> sink, boolean isBatch)
     
    static <T1> ConnectorCatalogTable<T1,?>
    source(org.apache.flink.table.legacy.sources.TableSource<T1> source, boolean isBatch)
     
    static <T1, T2> ConnectorCatalogTable<T1,T2>
    sourceAndSink(org.apache.flink.table.legacy.sources.TableSource<T1> source, org.apache.flink.table.legacy.sinks.TableSink<T2> sink, boolean isBatch)
     

    Methods inherited from class org.apache.flink.table.catalog.AbstractCatalogTable

    getComment, getOptions, getPartitionKeys, getSchema, isPartitioned

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.flink.table.catalog.CatalogBaseTable

    getUnresolvedSchema

    Methods inherited from interface org.apache.flink.table.catalog.CatalogTable

    getDistribution, getSnapshot, getTableKind
  • Constructor Details

    • ConnectorCatalogTable

      @VisibleForTesting protected ConnectorCatalogTable(org.apache.flink.table.legacy.sources.TableSource<T1> tableSource, org.apache.flink.table.legacy.sinks.TableSink<T2> tableSink, org.apache.flink.table.legacy.api.TableSchema tableSchema, boolean isBatch)
  • Method Details

    • source

      public static <T1> ConnectorCatalogTable<T1,?> source(org.apache.flink.table.legacy.sources.TableSource<T1> source, boolean isBatch)
    • sink

      public static <T2> ConnectorCatalogTable<?,T2> sink(org.apache.flink.table.legacy.sinks.TableSink<T2> sink, boolean isBatch)
    • sourceAndSink

      public static <T1, T2> ConnectorCatalogTable<T1,T2> sourceAndSink(org.apache.flink.table.legacy.sources.TableSource<T1> source, org.apache.flink.table.legacy.sinks.TableSink<T2> sink, boolean isBatch)
    • getTableSource

      public Optional<org.apache.flink.table.legacy.sources.TableSource<T1>> getTableSource()
    • getTableSink

      public Optional<org.apache.flink.table.legacy.sinks.TableSink<T2>> getTableSink()
    • isBatch

      public boolean isBatch()
    • copy

      public org.apache.flink.table.catalog.CatalogTable copy(Map<String,String> options)
    • copy

      public org.apache.flink.table.catalog.CatalogBaseTable copy()
    • getDescription

      public Optional<String> getDescription()
    • getDetailedDescription

      public Optional<String> getDetailedDescription()
    • calculateSourceSchema

      public static <T1> org.apache.flink.table.legacy.api.TableSchema calculateSourceSchema(org.apache.flink.table.legacy.sources.TableSource<T1> source, boolean isBatch)