Class TableCreateOptions.Builder
java.lang.Object
io.github.flink.gcp.connector.bigquery.sink.TableCreateOptions.Builder
- Enclosing class:
- TableCreateOptions
Builder for
TableCreateOptions.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the options.clusteredFields(List<String> fields) Clusters the table on the given columns, in precedence order (at most four).description(String description) Sets the description of a created table.Sets the labels of a created table, replacing any set before.Partitions the table on ingestion time with the given granularity.Partitions the table on the givenTIMESTAMP,DATEorDATETIMEcolumn with the given granularity — the three column types BigQuery partitions on.timePartitioningExpiration(Duration expiration) Sets the partition expiration; partitions older than this are deleted by BigQuery.
-
Method Details
-
timePartitioning
Partitions the table on ingestion time with the given granularity.- Parameters:
type- the partitioning granularity- Returns:
- this builder
-
timePartitioning
public TableCreateOptions.Builder timePartitioning(TableCreateOptions.TimePartitioningType type, String field) Partitions the table on the givenTIMESTAMP,DATEorDATETIMEcolumn with the given granularity — the three column types BigQuery partitions on.- Parameters:
type- the partitioning granularityfield- the column to partition on- Returns:
- this builder
-
timePartitioningExpiration
Sets the partition expiration; partitions older than this are deleted by BigQuery. Requires time partitioning to be configured.- Parameters:
expiration- the partition expiration, at least 1 ms- Returns:
- this builder
-
clusteredFields
Clusters the table on the given columns, in precedence order (at most four).- Parameters:
fields- the clustering columns- Returns:
- this builder
-
description
Sets the description of a created table.- Parameters:
description- the table description, not blank- Returns:
- this builder
-
labels
Sets the labels of a created table, replacing any set before.Keys must not be blank and values must not be
null; an empty value is a label with no value. Whether a key or value is one BigQuery accepts is BigQuery's answer, given when the table is created. The keyflink_gcp_cdcis rejected: the sink's CDC table provisioning owns it.- Parameters:
labels- the table labels- Returns:
- this builder
-
build
Builds the options.- Returns:
- the options
-