update an object array in a profile table is creating new object instead of updating new one | Community
Skip to main content
Level 2
June 26, 2025
Solved

update an object array in a profile table is creating new object instead of updating new one

  • June 26, 2025
  • 1 reply
  • 336 views
Hi Community, I have an array object in my profile type table. I want to add new key person_type in array object. When I added a new key and value and insert data into it. it created a new separate new array object in unified profile. In my unified profile I have two array object, one with old fields other with new fields. Can i ingest into same old array object and not have new array created. OLD OBJECT "personal_details": [ { "fistname":"smith", "lastname":"jose", "county" : "USA" },{ "fistname":"steve", "lastname":"anthony", "county" : "France" } ] New OBJECT "personal_details": [ { "fistname":"smith", "lastname":"jose", "county" : "USA", "person_type":"S" },{ "fistname":"steve", "lastname":"anthony", "county" : "France", "person_type":"Y" } ] Thanks in Advance Best Regards,
Best answer by KevinFosterDX

I've not seen good results combining upsert with arrays.

 

Nobody likes refactoring, but I'd split that array off into another schema/dataset where you don't need to use upsert. And then send the entire array every time that there's any change. Just ignore the array field in the original schema/dataset going forward.

1 reply

Level 2
June 26, 2025

Also I have enabled upsert in my dataset

KevinFosterDXAdobe EmployeeAccepted solution
Adobe Employee
June 28, 2025

I've not seen good results combining upsert with arrays.

 

Nobody likes refactoring, but I'd split that array off into another schema/dataset where you don't need to use upsert. And then send the entire array every time that there's any change. Just ignore the array field in the original schema/dataset going forward.