Class TableDescriptor.Builder
- Enclosing class:
- TableDescriptor
TableDescriptor.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns an immutable instance ofTableDescriptor.Define the comment for this table.distributedBy(int numberOfBuckets, String... bucketKeys) Defines that the table should be distributed into the given number of buckets by the given columns.distributedBy(String... bucketKeys) Defines that the table should be distributed into buckets over the given columns.distributedByHash(int numberOfBuckets, String... bucketKeys) Defines that the table should be distributed into the given number of buckets using a hash algorithm over the given columns.distributedByHash(String... bucketKeys) Defines that the table should be distributed into buckets using a hash algorithm over the given columns.distributedByRange(int numberOfBuckets, String... bucketKeys) Defines that the table should be distributed into the given number of buckets using a range algorithm over the given columns.distributedByRange(String... bucketKeys) Defines that the table should be distributed into buckets using a range algorithm over the given columns.distributedInto(int numberOfBuckets) Defines that the table should be distributed into the given number of buckets.Defines theformatto be used for this table.format(org.apache.flink.configuration.ConfigOption<String> formatOption, FormatDescriptor formatDescriptor) Defines the format to be used for this table.format(FormatDescriptor formatDescriptor) Defines the format to be used for this table.Sets the given option on the table.option(org.apache.flink.configuration.ConfigOption<T> configOption, T value) Sets the given option on the table.partitionedBy(String... partitionKeys) Define which columns this table is partitioned by.schema(org.apache.flink.table.api.Schema schema) Define the schema of theTableDescriptor.
-
Constructor Details
-
Builder
protected Builder() -
Builder
-
-
Method Details
-
schema
Define the schema of theTableDescriptor.The schema is typically required. It is optional only in cases where the schema can be inferred, e.g.
Table.insertInto(TableDescriptor). -
option
public <T> TableDescriptor.Builder option(org.apache.flink.configuration.ConfigOption<T> configOption, T value) Sets the given option on the table. -
option
Sets the given option on the table.Option keys must be fully specified. When defining options for a
format, useformat(FormatDescriptor)instead.Example:
TableDescriptor.forConnector("kafka") .option("scan.startup.mode", "latest-offset") .build(); -
format
Defines theformatto be used for this table.Note that not every connector requires a format to be specified, while others may use multiple formats. In the latter case, use
format(ConfigOption, FormatDescriptor)instead to specify for which option the format should be configured. -
format
Defines the format to be used for this table.Note that not every connector requires a format to be specified, while others may use multiple formats.
Options of the provided are automatically prefixed. For example,
descriptorBuilder.format(FormatDescriptor.forFormat("json") .option(JsonOptions.IGNORE_PARSE_ERRORS, true) .build()will result in the options
'format' = 'json' 'json.ignore-parse-errors' = 'true' -
format
public TableDescriptor.Builder format(org.apache.flink.configuration.ConfigOption<String> formatOption, FormatDescriptor formatDescriptor) Defines the format to be used for this table.Note that not every connector requires a format to be specified, while others may use multiple formats.
Options of the provided are automatically prefixed. For example,
descriptorBuilder.format(KafkaOptions.KEY_FORMAT, FormatDescriptor.forFormat("json") .option(JsonOptions.IGNORE_PARSE_ERRORS, true) .build()will result in the options
'key.format' = 'json' 'key.json.ignore-parse-errors' = 'true' -
distributedByHash
Defines that the table should be distributed into buckets using a hash algorithm over the given columns. The number of buckets is connector-defined. -
distributedByHash
Defines that the table should be distributed into the given number of buckets using a hash algorithm over the given columns. -
distributedByRange
Defines that the table should be distributed into buckets using a range algorithm over the given columns. The number of buckets is connector-defined. -
distributedByRange
Defines that the table should be distributed into the given number of buckets using a range algorithm over the given columns. -
distributedBy
Defines that the table should be distributed into buckets over the given columns. The number of buckets and used algorithm are connector-defined. -
distributedBy
Defines that the table should be distributed into the given number of buckets by the given columns. The used algorithm is connector-defined. -
distributedInto
Defines that the table should be distributed into the given number of buckets. The algorithm is connector-defined. -
partitionedBy
Define which columns this table is partitioned by. -
comment
Define the comment for this table. -
build
Returns an immutable instance ofTableDescriptor.
-