File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -696,11 +696,10 @@ Create Your Own Custom Write Strategy
696696
697697If none of the pre-built write strategy models suits your needs, you can
698698create your own. A custom write strategy model is a Java class that implements
699- ``WriteModelStrategy``. Specify your Java class in the
700- ``mongodb.writemodel.strategy`` :ref:`configuration setting
701- <kafka-sink-properties>`.
699+ ``WriteModelStrategy``.
702700
703- To create a custom ``WriteModelStrategy``:
701+ To configure your Sink Connector to use the custom ``WriteModelStrategy``,
702+ follow the steps below:
704703
7057041. Create a class that implements the ``WriteModelStrategy`` interface
706705 and overrides the ``createWriteModel(SinkDocument)`` method.
@@ -711,9 +710,13 @@ To create a custom ``WriteModelStrategy``:
711710 For more information about plugin paths, see the `Confluent documentation
712711 <https://docs.confluent.io/current/connect/managing/community.html>`__.
713712
713+ #. Specify your Java class in the ``mongodb.writemodel.strategy``
714+ :ref:`configuration setting <kafka-sink-properties>`.
715+
714716The following is an example of a custom write strategy. It extracts the
715717value of ``fullDocument`` from the value document and returns a
716- ``ReplaceOne`` operation.
718+ ``ReplaceOne`` operation. The ``ReplaceOne`` operation replaces a document
719+ in the MongoDB collection that matches the ID from the value document.
717720
718721.. code-block:: java
719722
You can’t perform that action at this time.
0 commit comments