Hello All,
CONTEXT: I am trying to bring segment qualifications from a partner into RT-CDP. The columns in their data export table looks like this - Hashed Email ID, Segment 1, Segment 2, Segment 3 .... Segment N (the qualification value is 1 or 0 depending on whether the user is in the segment or not.
Every month, there are incremental files we get. Every month the number of columns vary based on the data their team collects. Ex: This month we get 10 segments (Hashed Email ID, Segment 1, Segment 2 ... Segment 10) and next month we might get 15 segments (Hashed Email ID, Segment 1, Segment 2 ... Segment 15).
QUESTION: What would be best approach to model this and bring it in CDP? I also saw there was a "Segment Definition" class which is for bringing segment data from other systems (https://experienceleague.adobe.com/docs/experience-platform/xdm/classes/segment-definition.html?lang... but I am not sure how to use it. Any insights would be helpful. thx!
Views
Replies
Total Likes
Hi Pradeep,
You can Create a Individual profile class schema with the attributes required along with a field with data type "Segment Membership Details". From the source you can compose your data in the required format and ingest into the dataset. You can even try with Query services also to compose the data using Map function. But it is too hard as the segments you are thinking is dynamic in nature.
"segmentmembership": {
"external":{
"segment1":{
"status":"existing",
"lastqualificationtime":"2023-05-30T10:00:00.000Z"
},
"segment2":{
"status":"existing",
"lastqualificationtime":"2023-05-30T10:00:00.000Z"
},
"segment3":{
"status":"existing",
"lastqualificationtime":"2023-05-30T10:00:00.000Z"
},
"segment4":{
"status":"existing",
"lastqualificationtime":"2023-05-30T10:00:00.000Z"
},
"segment5":{
"status":"exiting",
"lastqualificationtime":"2023-05-30T10:00:00.000Z"
}
}
}
sample SQL on how to use the map function.
select map('externalSegments',
map('segment1',
struct (
'existing' as status,
'2023-05-30T10:00:00.000Z' as lastqualificationtime
)
,
'segment2',
struct (
'existing' as status,
'2023-05-30T10:00:00.000Z' as lastqualificationtime
)
)
)
Regards,
Vinod
@pradeep_nextrow Did the solution worked?
Views
Replies
Total Likes
Hi Nimasha, Trying out this and one another approach as suggested by @vinkom. Will post this once I compete it.
Views
Replies
Total Likes
Views
Likes
Replies