-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: Sink
-
Environment:All
-
Needed
-
Will take a document or an array of documents from a path in the source and bucket them to an array field in the destination document. In addition will also add an _insertedTS (inserted timestamp) and _modifiedTS (modified timestamp) fields into documents.
Set the following configuration: document.id.strategy=com.mongodb.kafka.connect.sink.processor.id.strategy.PartialValueStrategy
document.id.strategy.partial.value.projection.list=businessKeyField
document.id.strategy.partial.value.projection.type=AllowList
writemodel.strategy=com.mongodb.kafka.connect.sink.writemodel.strategy.UpdateOneBusinessKeyBucketStrategy
writemodel.strategy.bucketing.source.field=dataPayLoadField
writemodel.strategy.bucketing.source.field.multiple=false
writemodel.strategy.bucketing.target.array=bucketField
writemodel.strategy.bucketing.target.array.size=3
writemodel.strategy.bucketing.target.array.unique=true