Skip to content

Commit 497ecbd

Browse files
authored
DOCSP-26075: pre image setting (#64)
* DOCSP-26075: pre image setting * small fixes * RL link suggestion * DB PR fixes 1
1 parent 4deb0dd commit 497ecbd

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed

source/source-connector/configuration-properties/change-stream.txt

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,15 @@ Settings
6464
| **Description:**
6565
| Determines what values your change stream returns on update
6666
operations.
67-
| The ``default`` setting returns the differences between the original
67+
| The default setting returns the differences between the original
6868
document and the updated document.
6969
| The ``updateLookup`` setting returns the differences between the
7070
original document and updated document as well as a copy of the
7171
entire updated document at a *point in time* after the update.
72+
| The ``whenAvailable`` setting returns the updated document,
73+
if available.
74+
| The ``required`` setting returns the updated document and
75+
raises an error if it is not available.
7276

7377
.. tip::
7478

@@ -78,7 +82,32 @@ Settings
7882

7983
|
8084
| **Default**: ``""``
81-
| **Accepted Values**: ``""`` or ``"default"`` or ``"updateLookup"``
85+
| **Accepted Values**: ``""``, ``"updateLookup"``, ``"whenAvailable"``, or ``"required"``
86+
87+
* - | **change.stream.full.document.before.change**
88+
- | **Type:** string
89+
|
90+
| **Description:**
91+
| Configures the document pre-image your change stream returns on update
92+
operations. The pre-image is not available for source records
93+
published while copying existing data, and the pre-image configuration
94+
has no effect on copying.
95+
96+
.. tip::
97+
98+
To learn how to configure a collection to enable
99+
pre-images, see the :manual:`Server manual entry on pre- and
100+
post-images </changeStreams/#change-streams-with-document-pre--and-post-images>`.
101+
102+
| The default setting suppresses the document pre-image.
103+
| The ``whenAvailable`` setting returns the document pre-image if
104+
it's available, before it was replaced, updated, or
105+
deleted.
106+
| The ``required`` setting returns the document pre-image and
107+
raises an error if it is not available.
108+
|
109+
| **Default**: ``""``
110+
| **Accepted Values**: ``""`` or ``"whenAvailable"`` or ``"required"``
82111

83112
* - | **publish.full.document.only**
84113
- | **Type:** boolean

source/whats-new.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ Learn what's new by version:
3030
What's New in 1.9
3131
-----------------
3232

33-
- Introduced ``startup.mode=timestamp`` setting that allows you to
33+
- Introduced the ``startup.mode=timestamp`` setting that allows you to
3434
start a Change Stream at a specific timestamp by setting the new
3535
``startup.mode.timestamp.start.at.operation.time`` property.
3636
- Deprecated the ``copy.existing`` property and all ``copy.existing.*``
3737
properties. You should use ``startup.mode=copy_existing`` and
3838
``startup.mode.copy.existing.*`` properties to configure the copy existing
3939
feature.
40+
- Introduced the ``change.stream.full.document.before.change`` setting that
41+
allows you to access and configure the pre-image of an update
42+
operation in the change stream event document.
4043

4144
.. _kafka-connector-whats-new-1.8.1:
4245

0 commit comments

Comments
 (0)