Skip to main content
Level 3
Jun 26, 2025 9:56 AM UTC
Solved

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

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,
KevinFosterDXAccepted solution
Adobe Employee
Jun 28, 2025 3:32 AM UTC

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.

2 replies

Level 3
Jun 26, 2025 9:58 AM UTC

Also I have enabled upsert in my dataset

Translate
KevinFosterDXAdobe EmployeeAccepted solution
Adobe Employee
Jun 28, 2025 3:32 AM UTC

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.

Translate