Package org.apache.flink.table.api
Class TableDescriptor
- java.lang.Object
-
- org.apache.flink.table.api.TableDescriptor
-
@PublicEvolving public class TableDescriptor extends Object
Describes aCatalogTablerepresenting a source or sink.A
TableDescriptoris a template for creating aCatalogTableinstance. It closely resembles the "CREATE TABLE" SQL DDL statement, containing schema, connector options, and other characteristics. Since tables in Flink are typically backed by external systems, the descriptor describes how a connector (and possibly its format) are configured.This can be used to register a table in the Table API, see
TableEnvironment.createTemporaryTable(String, TableDescriptor).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTableDescriptor.BuilderBuilder forTableDescriptor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanequals(Object obj)static TableDescriptor.BuilderforConnector(String connector)Creates a newTableDescriptor.Builderfor a table using the given connector.static TableDescriptor.BuilderforManaged()Deprecated.This method will be removed soon.Optional<String>getComment()Optional<org.apache.flink.table.catalog.TableDistribution>getDistribution()Map<String,String>getOptions()List<String>getPartitionKeys()Optional<org.apache.flink.table.api.Schema>getSchema()inthashCode()TableDescriptor.BuildertoBuilder()Converts this immutable instance into a mutableTableDescriptor.Builder.org.apache.flink.table.catalog.CatalogTabletoCatalogTable()Converts this descriptor into aCatalogTable.StringtoString()
-
-
-
Method Detail
-
forConnector
public static TableDescriptor.Builder forConnector(String connector)
Creates a newTableDescriptor.Builderfor a table using the given connector.- Parameters:
connector- The factory identifier for the connector.
-
forManaged
@Deprecated public static TableDescriptor.Builder forManaged()
Deprecated.This method will be removed soon. Please see FLIP-346 for more details.Creates a newTableDescriptor.Builderfor a managed table.
-
getSchema
public Optional<org.apache.flink.table.api.Schema> getSchema()
-
getDistribution
public Optional<org.apache.flink.table.catalog.TableDistribution> getDistribution()
-
toCatalogTable
public org.apache.flink.table.catalog.CatalogTable toCatalogTable()
Converts this descriptor into aCatalogTable.
-
toBuilder
public TableDescriptor.Builder toBuilder()
Converts this immutable instance into a mutableTableDescriptor.Builder.
-
-