Skip to main content
Level 3
6月 26, 2025 9:56 午前 UTC
解決済み

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,
Adobe Employee
6月 28, 2025 3:32 午前 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 の返信

SantoshRa5作成者
Level 3
6月 26, 2025 9:58 午前 UTC

Also I have enabled upsert in my dataset

翻訳
Adobe Employee
6月 28, 2025 3:32 午前 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.

翻訳