Using Array Objects appends data when two records are merged? | Community
Skip to main content
Level 2
April 6, 2023
Question

Using Array Objects appends data when two records are merged?

  • April 6, 2023
  • 1 reply
  • 1186 views

Hi All,

 

Need your advice, we are using array object to store the indicators data like below,

Now when 2 record are merging which are having the exact same data within their respective arrays , merged record in the profile store is having duplicate data in array coming from both the records. Is this this usual array behavior or am I missing some setting?

Data from 2 records that are merging :

Record 1:

"ID": "1",
"email": "testemail123@gmail.com",
"T_Indicator": [{

"IndicatorValue_Bool": true,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_CC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"
},{
"IndicatorValue_Bool": false,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_DC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"
}]}

 

Record 2:

"ID": "2",
"email": "testemail123@gmail.com",
"T_Indicator": [{

"IndicatorValue_Bool": true,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_CC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"
},{
"IndicatorValue_Bool": false,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_DC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"
}]}

Output

"T_Indicator": [{

"IndicatorValue_Bool": true,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_CC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"},

{"IndicatorValue_Bool": false,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_DC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05" },

{"IndicatorValue_Bool": true,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_CC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"},

{"IndicatorValue_Bool": false,
"IndicatorValue_Dec": 8494.97,
"IndicatorValue_Text": "Ind_DC",
"T_Indicator": "sample1",
"T_Indicator_LastUpdate_Date": "2023-04-05"}]



This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Tof_Jossic
Adobe Employee
Adobe Employee
April 7, 2023

@ankita05 

Do you get the same behaviour when on a 'Timestamp ordered' merge policy? 

       |   In the event of a conflict, priority is given to the profile fragment which was updated most recently

 

See Merge policies overview

Ankita05Author
Level 2
April 7, 2023

Yes, we are using timestamp ordered merge policy only.