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
the document ``_id`` field, message key or value projection, renaming
27
+
fields, and redacting sensitive information. You can implement your own
28
+
post processor by extending the `PostProcessor <https://github.com/mongodb/mongo-kafka/blob/master/src/main/java/com/mongodb/kafka/connect/sink/processor/PostProcessor.java>`_
29
+
class or use one of the following pre-built ones:
32
30
33
31
.. list-table::
34
32
:header-rows: 1
@@ -74,7 +72,7 @@ class:
74
72
75
73
* - RenameByMapping
76
74
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.field.renaming.RenameByMapping``
77
-
| Renames fields that are an exact match to a specified key or value field.
75
+
| Renames fields that are an exact match to a specified field name in the key or value document.
78
76
79
77
.. seealso:: :ref:`Renaming configuration <config-field-renaming>` and :ref:`Example <field-renaming-mapping-example>`.
80
78
@@ -84,7 +82,7 @@ class:
84
82
85
83
.. seealso:: :ref:`Renaming configuration <config-field-renaming>` and :ref:`Example <field-renaming-regex-example>`.
86
84
87
-
85
+
88
86
You can configure the post processor chain by specifying an ordered,
89
87
comma separated list of fully-qualified ``PostProcessor`` class names:
90
88
@@ -155,7 +153,7 @@ provided with this connector:
155
153
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.id.strategy.PartialValueStrategy``
156
154
| Uses a block list or allow list projection of the value structure of the ``SinkDocument``.
157
155
| Defaults to a blank document if no value exists.
158
-
156
+
159
157
* - UuidProvidedInKeyStrategy
160
158
- | Full Path: ``com.mongodb.kafka.connect.sink.processor.id.strategy.UuidInKeyStrategy``
161
159
| Converts the _id key field to a UUID. The value must be either a string or binary type and must conform to the `UUID format <https://en.wikipedia.org/wiki/Universally_unique_identifier#Format>`__.
@@ -463,12 +461,15 @@ This section provides example configurations for the ``RenameByMapping``
463
461
and ``RenameByRegex`` post processors to show how they update field names
464
462
in a sink record. The field renaming parameters specify whether to update the
465
463
``key`` or ``value`` document in the record using dot notation as well as
466
-
the pattern to match and replacement string in a JSON array.
464
+
the pattern to match. You must specify the ``RenameByMapping`` and
465
+
``RenameByRegex`` properties with your parameters in a JSON array.
467
466
468
467
The field renaming post processor examples use the following sample sink
469
468
record:
470
469
471
-
**Key document**
470
+
.. _sample-key-document:
471
+
472
+
**Sample Key Document**
472
473
473
474
.. code-block:: json
474
475
@@ -478,7 +479,9 @@ record:
478
479
"date_day": 17
479
480
}
480
481
481
-
**Value document**
482
+
.. _sample-value-document:
483
+
484
+
**Sample Value Document**
482
485
483
486
.. code-block:: json
484
487
@@ -494,11 +497,13 @@ record:
494
497
RenameByMapping Example
495
498
^^^^^^^^^^^^^^^^^^^^^^^
496
499
497
-
The ``RenameByMapping`` post processor setting is an array of objects.
498
-
Each object in the array contains the following JSON element keys:
500
+
The ``RenameByMapping`` post processor setting specifies one or more
501
+
objects that assigns fields matching a string to a new name in a Key or Value
502
+
document.
499
503
500
-
Each object contains the text to match in the ``oldName`` element and
501
-
the replacement text in the ``newName`` element.
504
+
Each object contains the text to match in the ``oldName`` element and the
505
+
replacement text in the ``newName`` element as described in the table
506
+
below.
502
507
503
508
.. list-table::
504
509
:header-rows: 1
@@ -509,34 +514,44 @@ the replacement text in the ``newName`` element.
509
514
- Description
510
515
511
516
* - oldName
512
-
- Contains a string that matches on the text to replace.
517
+
- Specifies whether to match a key or value document and an appended
518
+
string that matches the field to replace.
513
519
514
520
* - newName
515
-
- Contains the replacement text for all matches of the string defined
521
+
- Contains the replacement text for all matches of the field defined
0 commit comments