T1
- type of the produced elements by the TableSource
T2
- type of the expected elements by the TableSink
@Internal public class ConnectorCatalogTable<T1,T2> extends AbstractCatalogTable
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.CatalogBaseTable.TableKind
Modifier | Constructor and Description |
---|---|
protected |
ConnectorCatalogTable(TableSource<T1> tableSource,
TableSink<T2> tableSink,
TableSchema tableSchema,
boolean isBatch) |
Modifier and Type | Method and Description |
---|---|
static <T1> TableSchema |
calculateSourceSchema(TableSource<T1> source,
boolean isBatch) |
CatalogBaseTable |
copy()
Get a deep copy of the CatalogBaseTable instance.
|
CatalogTable |
copy(Map<String,String> options)
Returns a copy of this
CatalogTable with given table options options . |
Optional<String> |
getDescription()
Get a brief description of the table or view.
|
Optional<String> |
getDetailedDescription()
Get a detailed description of the table or view.
|
Optional<TableSink<T2>> |
getTableSink() |
Optional<TableSource<T1>> |
getTableSource() |
boolean |
isBatch() |
static <T2> ConnectorCatalogTable<?,T2> |
sink(TableSink<T2> sink,
boolean isBatch) |
static <T1> ConnectorCatalogTable<T1,?> |
source(TableSource<T1> source,
boolean isBatch) |
static <T1,T2> ConnectorCatalogTable<T1,T2> |
sourceAndSink(TableSource<T1> source,
TableSink<T2> sink,
boolean isBatch) |
Map<String,String> |
toProperties()
Serializes this instance into a map of string-based properties.
|
getComment, getOptions, getPartitionKeys, getSchema, isPartitioned
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
fromProperties, getSnapshot, getTableKind, of, of
getUnresolvedSchema
@VisibleForTesting protected ConnectorCatalogTable(TableSource<T1> tableSource, TableSink<T2> tableSink, TableSchema tableSchema, boolean isBatch)
public static <T1> ConnectorCatalogTable<T1,?> source(TableSource<T1> source, boolean isBatch)
public static <T2> ConnectorCatalogTable<?,T2> sink(TableSink<T2> sink, boolean isBatch)
public static <T1,T2> ConnectorCatalogTable<T1,T2> sourceAndSink(TableSource<T1> source, TableSink<T2> sink, boolean isBatch)
public Optional<TableSource<T1>> getTableSource()
public boolean isBatch()
public Map<String,String> toProperties()
CatalogTable
Compared to the pure table options in CatalogBaseTable.getOptions()
, the map includes schema,
partitioning, and other characteristics in a serialized form.
public CatalogTable copy(Map<String,String> options)
CatalogTable
CatalogTable
with given table options options
.public CatalogBaseTable copy()
CatalogBaseTable
public Optional<String> getDescription()
CatalogBaseTable
public Optional<String> getDetailedDescription()
CatalogBaseTable
public static <T1> TableSchema calculateSourceSchema(TableSource<T1> source, boolean isBatch)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.