@PublicEvolving public class TableDescriptor extends Object
CatalogTable
representing a source or sink.
A TableDescriptor
is a template for creating a CatalogTable
instance. 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)
.
Modifier and Type | Class and Description |
---|---|
static class |
TableDescriptor.Builder
Builder for
TableDescriptor . |
Modifier | Constructor and Description |
---|---|
protected |
TableDescriptor(Schema schema,
Map<String,String> options,
List<String> partitionKeys,
String comment) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
static TableDescriptor.Builder |
forConnector(String connector)
Creates a new
TableDescriptor.Builder for a table using the given connector. |
static TableDescriptor.Builder |
forManaged()
Creates a new
TableDescriptor.Builder for a managed table. |
Optional<String> |
getComment() |
Map<String,String> |
getOptions() |
List<String> |
getPartitionKeys() |
Optional<Schema> |
getSchema() |
int |
hashCode() |
TableDescriptor.Builder |
toBuilder()
Converts this immutable instance into a mutable
TableDescriptor.Builder . |
CatalogTable |
toCatalogTable()
Converts this descriptor into a
CatalogTable . |
String |
toString() |
public static TableDescriptor.Builder forConnector(String connector)
TableDescriptor.Builder
for a table using the given connector.connector
- The factory identifier for the connector.public static TableDescriptor.Builder forManaged()
TableDescriptor.Builder
for a managed table.public CatalogTable toCatalogTable()
CatalogTable
.public TableDescriptor.Builder toBuilder()
TableDescriptor.Builder
.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.