Class BigQuerySinkConfig<T>
java.lang.Object
io.github.flink.gcp.connector.bigquery.sink.BigQuerySinkConfig<T>
- Type Parameters:
T- type of the records written by the sink
- All Implemented Interfaces:
Serializable
Immutable configuration shared by all
WriteMethod implementations, assembled by BigQuerySinkBuilder.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionCdcOptions<? super T>Returns the configured CDC options, ornullwhen ordinary appends are used.Returns the per-destination desired CDC table contract.Returns how this job handles CDC tables that already exist.Returns the table create disposition.DestinationResolver<? super T>Returns the per-record destination resolver.Returns the emulator endpoint the Storage Write API connections use, ornullwhen the sink talks to the production service.Returns the emulator endpoint the table metadata (REST) client uses, ornullwhen it talks to the production service.FailureHandler<? super BigQueryFailure>Returns the handler for record-specific routing and row failures.Returns the BigQuery location (for exampleUSorasia-northeast1) of the destination tables, ornullwhen unset.getSchemaFingerprint(TableDestination destination) Returns the delegate fingerprint; configured additional-field declarations are immutable.Returns the options gating connector-driven table schema updates.BigQueryProtoSerializationSchema<? super T>Returns the record serializer.Returns the service-account JSON key-file path, ornullwhen clients use ADC.Returns the per-destination creation options provider for auto-created tables.com.google.cloud.bigquery.storage.v1.TableSchemagetTableSchema(TableDestination destination) Returns the physical table schema, including configured additional fields.com.google.protobuf.Descriptors.DescriptorgetWriteDescriptor(TableDestination destination) Returns the descriptor sent to a writer, including every additional or write-only field.booleanReturns whether this job graph opted into connector-managed CDC table verification and provisioning.voidprepareWriteSchema(TableDestination destination) Validates the effective schema surfaces before entering per-row failure handling.com.google.protobuf.ByteStringserialize(T element, TableDestination destination) Serializes a row for its destination, including configured additional or write-only fields.
-
Method Details
-
getDestinationResolver
Returns the per-record destination resolver. -
getSerializer
Returns the record serializer. -
getCdcOptions
Returns the configured CDC options, ornullwhen ordinary appends are used. -
getTableSchema
public com.google.cloud.bigquery.storage.v1.TableSchema getTableSchema(TableDestination destination) Returns the physical table schema, including configured additional fields. -
managesCdcTableContract
public boolean managesCdcTableContract()Returns whether this job graph opted into connector-managed CDC table verification and provisioning.The field deliberately keeps Java's
falsedefault for job graphs serialized before CDC auto-creation existed. Those jobs retain their previous pre-created-table behavior after an upgrade instead of failing because their old creation options carry no primary-key declaration. -
getWriteDescriptor
Returns the descriptor sent to a writer, including every additional or write-only field. -
getSchemaFingerprint
Returns the delegate fingerprint; configured additional-field declarations are immutable. -
prepareWriteSchema
Validates the effective schema surfaces before entering per-row failure handling. -
serialize
@Nullable public com.google.protobuf.ByteString serialize(T element, TableDestination destination) throws IOException Serializes a row for its destination, including configured additional or write-only fields.- Throws:
IOException
-
getCreateDisposition
Returns the table create disposition. -
getTableCreateOptionsProvider
Returns the per-destination creation options provider for auto-created tables. -
getCdcTableOptionsProvider
Returns the per-destination desired CDC table contract. -
getCdcTableReconciliationPolicy
Returns how this job handles CDC tables that already exist. -
getSchemaUpdateOptions
Returns the options gating connector-driven table schema updates. -
getFailureHandler
Returns the handler for record-specific routing and row failures. -
getLocation
Returns the BigQuery location (for exampleUSorasia-northeast1) of the destination tables, ornullwhen unset. -
getServiceAccountKeyFile
Returns the service-account JSON key-file path, ornullwhen clients use ADC.Only the path is serialized into the job graph; runtime components load the file when they create their clients.
-
getEmulatorEndpoint
Returns the emulator endpoint the Storage Write API connections use, ornullwhen the sink talks to the production service. -
getEmulatorRestEndpoint
Returns the emulator endpoint the table metadata (REST) client uses, ornullwhen it talks to the production service. Separate fromgetEmulatorEndpoint()because BigQuery serves gRPC and REST on different ports.
-