Class DebeziumIO.Read<T>

java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PBegin,PCollection<T>>
org.apache.beam.io.debezium.DebeziumIO.Read<T>
All Implemented Interfaces:
Serializable, HasDisplayData
Enclosing class:
DebeziumIO

public abstract static class DebeziumIO.Read<T> extends PTransform<PBegin,PCollection<T>>
Implementation of DebeziumIO.read().
See Also:
  • Constructor Details

    • Read

      public Read()
  • Method Details

    • withConnectorConfiguration

      public DebeziumIO.Read<T> withConnectorConfiguration(DebeziumIO.ConnectorConfiguration config)
      Applies the given configuration to the connector. It cannot be null.
      Parameters:
      config - Configuration to be used within the connector.
      Returns:
      PTransform DebeziumIO.read()
    • withFormatFunction

      public DebeziumIO.Read<T> withFormatFunction(SourceRecordMapper<T> mapperFn)
      Applies a SourceRecordMapper to the connector. It cannot be null.
      Parameters:
      mapperFn - the mapper function to be used on each SourceRecord.
      Returns:
      PTransform DebeziumIO.read()
    • withCoder

      public DebeziumIO.Read<T> withCoder(Coder<T> coder)
      Applies a Coder to the connector. It cannot be null
      Parameters:
      coder - The Coder to be used over the data.
      Returns:
      PTransform DebeziumIO.read()
    • withMaxNumberOfRecords

      public DebeziumIO.Read<T> withMaxNumberOfRecords(Integer maxNumberOfRecords)
      Once the specified number of records has been reached, it will stop fetching them. The value can be null (default) which means it will not stop.
      Parameters:
      maxNumberOfRecords - The maximum number of records to be fetched before stop.
      Returns:
      PTransform DebeziumIO.read()
    • withMaxTimeToRun

      public DebeziumIO.Read<T> withMaxTimeToRun(Long miliseconds)
      Once the connector has run for the determined amount of time, it will stop. The value can be null (default) which means it will not stop. This parameter is mainly intended for testing.
      Parameters:
      miliseconds - The maximum number of miliseconds to run before stopping the connector.
      Returns:
      PTransform DebeziumIO.read()
    • getRecordSchema

      protected Schema getRecordSchema()
    • expand

      public PCollection<T> expand(PBegin input)
      Description copied from class: PTransform
      Override this method to specify how this PTransform should be expanded on the given InputT.

      NOTE: This method should not be called directly. Instead apply the PTransform should be applied to the InputT using the apply method.

      Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).

      Specified by:
      expand in class PTransform<PBegin,PCollection<T>>