Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
SOLVED

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

Avatar

Level 2
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,
1 Accepted Solution

Avatar

Correct answer by
Employee

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.

View solution in original post

2 Replies

Avatar

Level 2

Also I have enabled upsert in my dataset

Avatar

Correct answer by
Employee

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.