Class TableCreateOptions

java.lang.Object
io.github.flink.gcp.connector.bigquery.sink.TableCreateOptions
All Implemented Interfaces:
Serializable

@Public public final class TableCreateOptions extends Object implements Serializable
Options applied when the sink creates a destination table under CreateDisposition.CREATE_IF_NEEDED: time partitioning and clustering.

The table schema is not part of these options — it always comes from BigQueryProtoSerializationSchema.getTableSchema(io.github.flink.gcp.connector.bigquery.sink.TableDestination). Partitioning and clustering only affect table creation. CDC properties are configured through CdcTableOptions because they also describe existing-table verification and reconciliation.

Instances are immutable and serializable. Use defaults() for plain, unpartitioned tables.

See Also:
  • Method Details

    • defaults

      public static TableCreateOptions defaults()
      Returns options creating a plain table: no partitioning, no clustering.
    • builder

      public static TableCreateOptions.Builder builder()
      Returns:
      a new builder
    • getTimePartitioningType

      public TableCreateOptions.TimePartitioningType getTimePartitioningType()
      Returns the time-partitioning granularity, or null when unpartitioned.
    • getTimePartitioningField

      public String getTimePartitioningField()
      Returns the column the table is partitioned on, or null for ingestion-time partitioning (and for unpartitioned tables).
    • getTimePartitioningExpirationMs

      public Long getTimePartitioningExpirationMs()
      Returns the partition expiration in milliseconds, or null when partitions never expire.
    • getClusteredFields

      public List<String> getClusteredFields()
      Returns the clustering columns, in precedence order; empty when unclustered.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object