Class TableCreateOptions

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

@Public public final class TableCreateOptions extends Object implements Serializable
The settings for the table the sink creates under CreateDisposition.CREATE_IF_NEEDED: its column families and, per family, an optional garbage-collection rule.

Unlike the Pub/Sub sink's topic settings, this object is required beside CREATE_IF_NEEDED rather than additive: a topic can meaningfully be created with defaults, but a Bigtable table's schema is its column families, which the sink cannot guess — a table created without them rejects every mutation and is a table someone has to fix later. Combining options with CreateDisposition.CREATE_NEVER is rejected at build(), and so is CREATE_IF_NEEDED without options.

Creation only, per family. A table that already exists is written to as it is: the families declared here that it lacks are added — with their rules — but an existing family's garbage-collection rule is neither compared nor updated. A family declared without a rule keeps Bigtable's default of collecting nothing; see GcRule for why that choice matters for an at-least-once sink.

Validation stops at what would otherwise fail obscurely (a blank name, an empty family set); Bigtable's own name grammar and limits are left to the service, whose rejection names the field and the limit. Instances are immutable and serializable.

See Also: