[KAFKA-87] UpdateOneStrategy Created: 14/Feb/20  Updated: 29/Sep/20  Resolved: 29/Sep/20

Status: Closed
Project: Kafka Connector
Component/s: None
Affects Version/s: 1.1, 1.0.1
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Ángel Martínez Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to KAFKA-130 Create example WriteModelStrategy Closed

 Description   

Add a new custom WriteModelStrategy that expects an upsert command and supports all update operators ($push, $pull, $addToSet, etc.): https://docs.mongodb.com/manual/reference/operator/update/

 



 Comments   
Comment by Ross Lawley [ 29/Sep/20 ]

The issue is there's no clear way to understand how / when to use specific update operators without some existing knowledge of the data.

I can't see how this would be configured, so closing as won't fix. Users would have to implement their own custom logic / WriteModelStrategy to achieve this aim.

Happy to reopen and review if there is something I've missed.

Comment by Ross Lawley [ 14/Feb/20 ]

Hi angel.martinez,

The complication is being able to describe the operation via configuration and documentation. If you can provide an example of the operation you'd like to see and how you could configure that via json, that would be super helpful.

In the meantime, users are able to create their own implementations of WriteModelStrategy with any custom logic and include it in the path when deploying to Kafka Connect.

Ross

Comment by Ángel Martínez [ 14/Feb/20 ]

Trying to clarify: this refers to the sink connector. Also, to avoid a large amount of documents being updated, the sink could be expecting just the update part of an UpdateOne command (https://docs.mongodb.com/manual/reference/method/db.collection.updateOne/), excluding filter and options

Generated at Thu Feb 08 09:05:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.