Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-3603

Provide an example of usage of snapshot.select.statement.overrides

    XMLWordPrintable

Details

    Description

      https://debezium.io/documentation/reference/connectors/sqlserver.html#sqlserver-property-snapshot-select-statement-overrides

      IMO, current description lacks a good example.

      Quoting Chris @Naros Cranford that provided a good one:

      Lets say you have some tables that have lots of rows in them but you use a soft delete column and you're only interested in rows during the snapshot where the record isn't soft deleted, then you would use:

      "snapshot.select.statement.overrides": "dbo.my_large_table_with_soft_deletes",
      "snapshot.select.statement.overrides.dbo.my_large_table_with_soft_deletes": "select * from [dbo].[my_large_table_with_soft_deletes] where delete_flag = 0 order by id desc"

      For this large table, only records where delete_flag = 0will be emitted as snaphot / read records.

       

      Attachments

        Activity

          People

            broldan@redhat.com Robert Roldan
            ilya.konyakhin Ilya Konyakhin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: