Class QueryingSnapshotter

java.lang.Object
io.debezium.connector.postgresql.snapshot.QueryingSnapshotter
All Implemented Interfaces:
Snapshotter
Direct Known Subclasses:
AlwaysSnapshotter, InitialOnlySnapshotter, InitialSnapshotter

public abstract class QueryingSnapshotter extends Object implements Snapshotter
  • Constructor Details

    • QueryingSnapshotter

      public QueryingSnapshotter()
  • Method Details

    • init

      public void init(PostgresConnectorConfig config, OffsetState sourceInfo, SlotState slotState)
      Specified by:
      init in interface Snapshotter
    • buildSnapshotQuery

      public Optional<String> buildSnapshotQuery(TableId tableId, List<String> snapshotSelectColumns)
      Description copied from interface: Snapshotter
      Generate a valid postgres query string for the specified table, or an empty Optional to skip snapshotting this table (but that table will still be streamed from)
      Specified by:
      buildSnapshotQuery in interface Snapshotter
      Parameters:
      tableId - the table to generate a query for
      snapshotSelectColumns - the columns to be used in the snapshot select based on the column include/exclude filters
      Returns:
      a valid query string, or none to skip snapshotting this table
    • snapshotTableLockingStatement

      public Optional<String> snapshotTableLockingStatement(Duration lockTimeout, Set<TableId> tableIds)
      Description copied from interface: Snapshotter
      Returns a SQL statement for locking the given tables during snapshotting, if required by the specific snapshotter implementation.
      Specified by:
      snapshotTableLockingStatement in interface Snapshotter
    • snapshotTransactionIsolationLevelStatement

      public String snapshotTransactionIsolationLevelStatement(SlotCreationResult newSlotInfo)
      Description copied from interface: Snapshotter
      Return a new string that set up the transaction for snapshotting
      Specified by:
      snapshotTransactionIsolationLevelStatement in interface Snapshotter
      Parameters:
      newSlotInfo - if a new slot was created for snapshotting, this contains information from the `create_replication_slot` command