You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/kafka-sink-postprocessors.txt
+13-9Lines changed: 13 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -427,7 +427,7 @@ The record contains the following data after applying the projection:
427
427
428
428
{
429
429
"forecast": [
430
-
{
430
+
{
431
431
"day": "Monday",
432
432
"uv": 5
433
433
}
@@ -663,6 +663,10 @@ strategies are provided with the connector:
663
663
664
664
.. seealso:: Example of usage in :ref:`writemodel-strategy-timestamps`.
665
665
666
+
* - UpdateOneBusinessKeyTimestampStrategy
667
+
- | Add ``_insertedTS`` (inserted timestamp) and ``_modifiedTS`` (modified timestamp) fields into documents that match the filters provided by the ``document.id.strategy`` setting.
668
+
| Set the following configuration: ``writemodel.strategy=com.mongodb.kafka.connect.sink.writemodel.strategy.UpdateOneBusinessKeyTimestampStrategy``
669
+
666
670
.. note::
667
671
668
672
Future versions of the MongoDB Kafka Connector will allow developers to
@@ -676,12 +680,12 @@ WriteModel Strategy: Business Keys
676
680
A business key is a value comprised of data within the sink record that
677
681
identifies it as a unique document. This example defines a business key
678
682
using data contained within multiple fields in the record as well as
679
-
instructs the post processor to generate *BSON ObjectIds* for inserts,
683
+
instructs the post processor to generate *BSON ObjectIds* for inserts,
680
684
but not for updates.
681
685
682
686
The following steps are required to configure this strategy:
683
687
684
-
#. Create a :manual:`unique index </core/index-unique>` that corresponds to
688
+
#. Create a :manual:`unique index </core/index-unique>` that corresponds to
685
689
your business key in your target MongoDB collection.
686
690
#. In the connector configuration, specify the ``PartialValueStrategy``
687
691
as the id strategy to identify the fields that belong to the business
@@ -690,7 +694,7 @@ The following steps are required to configure this strategy:
0 commit comments