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).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
-
build
Builds the options.- Returns:
- the options
-