Field level update is not working with nested JSON structure in MongoDB destination

asked 2020-10-26 14:04:59 -0600

Rahul061204 gravatar image

Hi All,

I am having 1 use case where multiple streamsets are performing CRUD operations to single mongo collection and data is stored in nested JSON structure as shown below. When i am trying to updated specific field within nested JSON record , its replacing all other values and updating entire object , instead of specific field.

Mongo Document : { _id........ "roll_no" : "101" (Also MongoDB destination is not able to find integer uniq index values) "personal_data" : { "name" : "test" "age" : 24 }

incoming JSON record as an update to the document: { "roll_no" : "101" "personal_data" : { "gender" : "M" } }

Expected result : { _id........ "roll_no" : "101" (Also MongoDB destination is not able to find integer uniq index values) "personal_data" : { "name" : "test" "age" : 24 "gender" : "M" } }

Actual result : { _id........ "roll_no" : "101" (Also MongoDB destination is not able to find integer uniq index values) "personal_data" : { "gender" : "M" } }

Roll no is uniq index to my collection. Many thanks in advance for anykind of help.

edit retag flag offensive close merge delete