Package org.apache.flink.table.catalog
Class ExternalCatalogTable
- java.lang.Object
-
- org.apache.flink.table.catalog.ExternalCatalogTable
-
- All Implemented Interfaces:
CatalogBaseTable
,CatalogTable
@Internal public final class ExternalCatalogTable extends Object implements CatalogTable
HelperCatalogTable
for representing a table that is backed by some inline connector (i.e.DataStream
orTableResult.collect()
).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.flink.table.catalog.CatalogBaseTable
CatalogBaseTable.TableKind
-
Nested classes/interfaces inherited from interface org.apache.flink.table.catalog.CatalogTable
CatalogTable.Builder
-
-
Constructor Summary
Constructors Constructor Description ExternalCatalogTable(Schema schema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CatalogBaseTable
copy()
Get a deep copy of the CatalogBaseTable instance.CatalogTable
copy(Map<String,String> options)
Returns a copy of thisCatalogTable
with given table optionsoptions
.String
getComment()
Get comment of the table or view.Optional<String>
getDescription()
Get a brief description of the table or view.Optional<String>
getDetailedDescription()
Get a detailed description of the table or view.Map<String,String>
getOptions()
Returns a map of string-based options.List<String>
getPartitionKeys()
Get the partition keys of the table.Schema
getUnresolvedSchema()
Returns the schema of the table or view.boolean
isPartitioned()
Check if the table is partitioned or not.-
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
getSchema
-
Methods inherited from interface org.apache.flink.table.catalog.CatalogTable
getDistribution, getSnapshot, getTableKind, toProperties
-
-
-
-
Constructor Detail
-
ExternalCatalogTable
public ExternalCatalogTable(Schema schema)
-
-
Method Detail
-
getUnresolvedSchema
public Schema getUnresolvedSchema()
Description copied from interface:CatalogBaseTable
Returns the schema of the table or view.The schema can reference objects from other catalogs and will be resolved and validated by the framework when accessing the table or view.
- Specified by:
getUnresolvedSchema
in interfaceCatalogBaseTable
- See Also:
ResolvedCatalogTable
,ResolvedCatalogView
-
getOptions
public Map<String,String> getOptions()
Description copied from interface:CatalogBaseTable
Returns a map of string-based options.In case of
CatalogTable
, these options may determine the kind of connector and its configuration for accessing the data in the external system. SeeDynamicTableFactory
for more information. If aCatalogTable
should not be serializable, an implementation can simply throw a runtime exception in this method.- Specified by:
getOptions
in interfaceCatalogBaseTable
-
getComment
public String getComment()
Description copied from interface:CatalogBaseTable
Get comment of the table or view.- Specified by:
getComment
in interfaceCatalogBaseTable
- Returns:
- comment of the table/view.
-
copy
public CatalogBaseTable copy()
Description copied from interface:CatalogBaseTable
Get a deep copy of the CatalogBaseTable instance.- Specified by:
copy
in interfaceCatalogBaseTable
- Returns:
- a copy of the CatalogBaseTable instance
-
getDescription
public Optional<String> getDescription()
Description copied from interface:CatalogBaseTable
Get a brief description of the table or view.- Specified by:
getDescription
in interfaceCatalogBaseTable
- Returns:
- an optional short description of the table/view
-
getDetailedDescription
public Optional<String> getDetailedDescription()
Description copied from interface:CatalogBaseTable
Get a detailed description of the table or view.- Specified by:
getDetailedDescription
in interfaceCatalogBaseTable
- Returns:
- an optional long description of the table/view
-
isPartitioned
public boolean isPartitioned()
Description copied from interface:CatalogTable
Check if the table is partitioned or not.- Specified by:
isPartitioned
in interfaceCatalogTable
- Returns:
- true if the table is partitioned; otherwise, false
-
getPartitionKeys
public List<String> getPartitionKeys()
Description copied from interface:CatalogTable
Get the partition keys of the table. This will be an empty set if the table is not partitioned.- Specified by:
getPartitionKeys
in interfaceCatalogTable
- Returns:
- partition keys of the table
-
copy
public CatalogTable copy(Map<String,String> options)
Description copied from interface:CatalogTable
Returns a copy of thisCatalogTable
with given table optionsoptions
.- Specified by:
copy
in interfaceCatalogTable
- Returns:
- a new copy of this table with replaced table options
-
-