@@ -707,7 +707,7 @@ using data contained within multiple fields in the record as well as
707
707
instructs the post processor to generate *BSON ObjectIds* for inserts,
708
708
but not for updates.
709
709
710
- The following steps are required to configure this strategy:
710
+ Follow the steps below to configure this strategy:
711
711
712
712
#. Create a :manual:`unique index </core/index-unique>` that corresponds to
713
713
your business key in your target MongoDB collection.
@@ -718,8 +718,8 @@ The following steps are required to configure this strategy:
718
718
``ReplaceOneBusinessKeyStrategy`` writemodel strategy.
719
719
720
720
For this example, we track airplane capacity by the flight number and
721
- airport it is currently located represented by ``flight_no`` and
722
- ``airport_code``, respectively. An example message contains the following:
721
+ airport location represented by ``flight_no`` and ``airport_code``,
722
+ respectively. An example message contains the following:
723
723
724
724
.. code-block:: json
725
725
@@ -732,7 +732,7 @@ airport it is currently located represented by ``flight_no`` and
732
732
}
733
733
}
734
734
735
- In order to implement the strategy, we first create a unique index on the
735
+ To implement the strategy, we first create a unique index on the
736
736
``flight_no`` and ``airport_code`` fields in the MongoDB shell:
737
737
738
738
.. code-block:: none
@@ -747,8 +747,8 @@ file:
747
747
.. code-block:: properties
748
748
749
749
document.id.strategy=com.mongodb.kafka.connect.sink.processor.id.strategy.PartialValueStrategy
750
- value.projection.list=flight_no,airport_code
751
- value.projection.type=AllowList
750
+ document.id.strategy.partial. value.projection.list=flight_no,airport_code
751
+ document.id.strategy.partial. value.projection.type=AllowList
752
752
writemodel.strategy=com.mongodb.kafka.connect.sink.writemodel.strategy.ReplaceOneBusinessKeyStrategy"
753
753
754
754
The sample data inserted into the collection contains the following:
@@ -783,18 +783,6 @@ values without changing the ``_id`` field.
783
783
}
784
784
}
785
785
786
- .. admonition:: Projection post processors are not compatible with PartialValueStrategy
787
- :class: warning
788
-
789
- The ``PartialValueStrategy`` id strategy uses the
790
- ``[key|value].projection.type`` and ``[key|value].projection.list``
791
- settings to define which fields are used to form the ``_id`` field.
792
- Since the Block List and Allow List post processors use the same
793
- projection settings, they cannot be specified separately. Use a `Single
794
- Message Transform (SMT)
795
- <https://docs.confluent.io/current/connect/transforms/index.html>`_
796
- outside the connector to format your source data as necessary.
797
-
798
786
.. _writemodel-strategy-timestamps:
799
787
800
788
WriteModel Strategy: Inserted and Modified Timestamps
0 commit comments