Hi,
I am writing into an array inside a data set using query service daily against a profile , coming next run we wish previous values of array to get replaced with the new values. As we notice right now values inside array fields are getting appended rather getting replaced.
Example -
Day 1 :
Data ingested using query (batch)
ID |
Product Viewed Recently (array) |
123 |
‘A','B','C' |
In Profile we see Product Viewed Recently as ‘A’,’B’,’C’ across 0,1,2, array placement
Day 2
Data ingested using query (batch)
ID |
Product Viewed Recently (array) |
123 |
‘D’,’E’,’F’ |
In Profile we see Product Viewed Recently as ‘A’,’B’,’C’ ,’D’,’E’,’F’ across 0,1,2, 3,4,5 array placement. Whereas only want to see ‘D’,’E’,’F’.
Is there a way for specific dataset we can set possibility of replacing an array field instead of appending ?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Nikhil,
Little curious on how "Product Viewed Recently (array)" is used in a profile class and not in event.
Can you try the mapper function upsert_array_replace and see if it does the overwrite for you? (If your dataset is upsert enabled)
Ref : Data Prep Mapping Functions | Adobe Experience Platform
Views
Replies
Total Likes
Can you tell us a little more about:
By default the array should be replaced, assuming:
Views
Replies
Total Likes
Hi Danny-Miller,
Here are my comments , thanks in advance
Can you tell us a little more about:
By default the array should be replaced, assuming:
Views
Replies
Total Likes
Interesting. It might help to see the actual code/data, but sounds like you are doing the right thing.
Views
Replies
Total Likes
I tried inserting array values for the same profile via data flow (batch) as well skipping the query service to test if previous array is replaced or appended. In this case also I see new array values getting added to array list rather than replacing the previous one. Could this be any property setting of dataset / schema
Views
Replies
Total Likes
Not that I know of. I'd try and reproduce it in a new sandbox, schema, dataset, etc. and simplify it down as much as possible. Then open a ticket &/or come back here with actual screenshots and queries.
Views
Replies
Total Likes
Hi Nikhil,
Little curious on how "Product Viewed Recently (array)" is used in a profile class and not in event.
Can you try the mapper function upsert_array_replace and see if it does the overwrite for you? (If your dataset is upsert enabled)
Ref : Data Prep Mapping Functions | Adobe Experience Platform
Views
Replies
Total Likes
Yes dataset is upsert enabled, this makes sense. I think when dataset is upsert enabled Array enrichment is considered as append rather than replacing current array (which I think could make sense ). Possible solution could be to either disable upsert true
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies