Hi Community,
I have to replace complete array with new values of array on every batch ingestion, but on every batch ingestion new items gets appended to this array in target dataset instead of replace. I have used upsert_array_replace in a calculated field and my dataset is profile and upsert enabled. Below is the structure of my target and source array, it has a primary identifier as "key" and "comm_details" array object to replace.
Calculate Field : upsert_array_replace (_tenant.comm_details) -- Source
Dataset Field : _tenant.comm_detail[*] -- Target
I have already gone through documentation.
https://experienceleague.adobe.com/sv/docs/experience-platform/data-prep/functions#arrays
Could you please let me know if this is expected behavior or I am missing anything.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Communicty,
upsert_array_replace() works for streaming ingestions only, not for batch ingestion. I am using batch ingestion.
Regards
Santosh
The upsert_array_replace() function in AEP only replaces arrays if the schema is correctly aligned and the merge policy is configured to support full array replacement. If not, arrays may get appended instead.
To fix this, ensure the source and target schemas match exactly, use a merge policy that replaces (not merges) arrays based on timestamps, and always send the full array in each batch. If the issue persists, contact Adobe Support with payload samples and your merge policy details.
Views
Replies
Total Likes
Hi RishiKumar,
Thanks for the reply.
Merge polices is default i.e. timestamp based, and source and target schema are aligned. I will raise ticket to Adobe.
Regards,
Santosh
Views
Replies
Total Likes
Hi Communicty,
upsert_array_replace() works for streaming ingestions only, not for batch ingestion. I am using batch ingestion.
Regards
Santosh
Thanks @SantoshRa5, for sharing the update!
Views
Replies
Total Likes
Views
Likes
Replies