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

@Internal public final class BigQuerySinkConfig<T> extends Object implements Serializable
Immutable configuration shared by all WriteMethod implementations, assembled by BigQuerySinkBuilder.
See Also:
  • Method Details

    • getDestinationResolver

      public DestinationResolver<? super T> getDestinationResolver()
      Returns the per-record destination resolver.
    • getSerializer

      public BigQueryProtoSerializationSchema<? super T> getSerializer()
      Returns the record serializer.
    • getCdcOptions

      @Nullable public CdcOptions<? super T> getCdcOptions()
      Returns the configured CDC options, or null when 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 false default 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

      public com.google.protobuf.Descriptors.Descriptor getWriteDescriptor(TableDestination destination)
      Returns the descriptor sent to a writer, including every additional or write-only field.
    • getSchemaFingerprint

      public Object getSchemaFingerprint(TableDestination destination)
      Returns the delegate fingerprint; configured additional-field declarations are immutable.
    • prepareWriteSchema

      public void prepareWriteSchema(TableDestination destination)
      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

      public CreateDisposition getCreateDisposition()
      Returns the table create disposition.
    • getTableCreateOptionsProvider

      public TableCreateOptionsProvider getTableCreateOptionsProvider()
      Returns the per-destination creation options provider for auto-created tables.
    • getCdcTableOptionsProvider

      public CdcTableOptionsProvider getCdcTableOptionsProvider()
      Returns the per-destination desired CDC table contract.
    • getCdcTableReconciliationPolicy

      public CdcTableReconciliationPolicy getCdcTableReconciliationPolicy()
      Returns how this job handles CDC tables that already exist.
    • getSchemaUpdateOptions

      public SchemaUpdateOptions getSchemaUpdateOptions()
      Returns the options gating connector-driven table schema updates.
    • getFailureHandler

      public FailureHandler<? super BigQueryFailure> getFailureHandler()
      Returns the handler for record-specific routing and row failures.
    • getLocation

      public String getLocation()
      Returns the BigQuery location (for example US or asia-northeast1) of the destination tables, or null when unset.
    • getServiceAccountKeyFile

      @Nullable public String getServiceAccountKeyFile()
      Returns the service-account JSON key-file path, or null when clients use ADC.

      Only the path is serialized into the job graph; runtime components load the file when they create their clients.

    • getEmulatorEndpoint

      @Nullable public EmulatorEndpoint getEmulatorEndpoint()
      Returns the emulator endpoint the Storage Write API connections use, or null when the sink talks to the production service.
    • getEmulatorRestEndpoint

      @Nullable public EmulatorEndpoint getEmulatorRestEndpoint()
      Returns the emulator endpoint the table metadata (REST) client uses, or null when it talks to the production service. Separate from getEmulatorEndpoint() because BigQuery serves gRPC and REST on different ports.