I have created a MongoDB sink connector where the document has nested arrays. If the json for the update operation does not have the full array it will delete the missing items from the array. How can i fix this issue.
The following json
{
“id”:1,
“name”:“Test”,
“dept”:[
{
“deptId”:12,
“deptName”:“Dept 1”
},
{
“deptId”:14,
“deptName”:“Dept 2”
}
}
If the update json does not have the dept id 14 it will delete that object from the MongoDB document.