11---
22title :Profiles Sync Tables and Materialized Views
33beta :true
4+ plan :profiles
45---
56
67Through Profiles Sync, Segment provides data sets and models that can help you enrich customer profiles using any warehouse data available to you.
@@ -90,12 +91,16 @@ As a result, this table contains information about the creation and merging of p
9091
9192Using the profile merge scenario, Segment would generate three new entries to this table:
9293
94+ <div style =" overflow-x :auto ;" markdown =1 >
95+
9396| ` segment_id ` | ` canonical_segment_id ` | ` triggering_event_type ` | ` triggering_event_id ` | ` timestamp ` |
9497| ------------| ----------------------| -----------------------| ---------------------| -------------------|
9598| ` profile_1 ` | ` profile_1 ` | ` page ` | ` event_1 ` | 2022-05-02 14:01:00|
9699| ` profile_2 ` | ` profile_2 ` | ` page ` | ` event_3 ` | 2022-06-22 10:47:15|
97100| ` profile_2 ` | ` profile_1 ` | ` identify ` | ` event_4 ` | 2022-06-22 10:48:00|
98101
102+ </div >
103+
99104In this example, the table shows` profile_2 ` mapping to two places: first to itself, then, later, to` profile_1 ` after the merge occurs.
100105
101106####Recursive entries
@@ -110,20 +115,15 @@ This table maps Segment-generated identifiers, like `segment_id`, to external id
110115
111116The anonymous site visits sample used earlier would generate the following events:
112117
118+ <div style =" overflow-x :auto ;" markdown =1 >
119+
113120| ` segment_id ` | ` canonical_segment_id ` | ` triggering_event_type ` | ` triggering_event_id ` | ` timestamp ` |
114121| ------------| ----------------------| -----------------------| ---------------------| -------------------|
115122| ` profile_1 ` | ` profile_1 ` | ` page ` | ` event_1 ` | 2022-05-02 14:01:00|
116123| ` profile_2 ` | ` profile_2 ` | ` page ` | ` event_3 ` | 2022-06-22 10:47:15|
117124| ` profile_2 ` | ` profile_1 ` | ` identify ` | ` event_4 ` | 2022-06-22 10:48:00|
118125
119- (stacked vertically)
120-
121- | ` segment_id ` | ` profile_1 ` | ` profile_2 ` | ` profile_2 ` |
122- | -----------------------| -------------------| -------------------| -------------------|
123- | ` canonical_segment_id ` | ` profile_1 ` | ` profile_2 ` | ` event_1 ` |
124- | ` triggering_event_type ` | ` page ` | ` page ` | ` identify ` |
125- | ` triggering_event_id ` | ` event_1 ` | ` event_3 ` | ` event_4 ` |
126- | ` timestamp ` | 2022-05-02 14:01:00| 2022-06-22 10:47:15| 2022-06-22 10:48:00|
126+ </div >
127127
128128In this table, Segment shows three observed identifiers. For each of the three identifiers, Segment outputs the Segment ID initially associated with the identifier.
129129
@@ -140,18 +140,26 @@ These event tables are similar to the tables landed by Segment warehouse integra
140140
141141The previous result would generate two entries in the` pages ` table:
142142
143+ <div style =" overflow-x :auto ;" markdown =1 >
144+
143145| ` segment_id ` | ` context_url ` | ` anonymous_id ` | ` event_source_id ` | ` event_id ` | ` timestamp ` |
144146| ------------| ----------------------| --------------------| -----------------| ----------| -------------------|
145147| ` profile_1 ` | ` twilio.com ` | ` 5285bc35-05ef-4d21 ` | ` source_1 ` | ` event_1 ` | 2022-05-02 14:01:00|
146148| ` profile_2 ` | ` twilio.com/education ` | ` b50e18a5-1b8d-451c ` | ` source_1 ` | ` event_3 ` | 2022-06-22 10:47:15|
147149
150+ </div >
151+
148152And two entries in the` identifies ` table:
149153
154+ <div style =" overflow-x :auto ;" markdown =1 >
155+
150156| ` segment_id ` | ` context_url ` | ` anonymous_id ` | ` email ` | ` event_source_id ` | ` event_id ` | ` timestamp ` |
151157| ------------| ----------------------------| --------------------| ----------------------| -----------------| ----------| -------------------|
152158| ` profile_1 ` | ` twilio.com/try_twilio ` | ` 5285bc35-05ef-4d21 ` | ` jane.kim@segment.com ` | ` source_1 ` | ` event_2 ` | 2022-05-02 14:01:47|
153159| ` profile_2 ` | ` twilio.com/events/webinars ` | ` b50e18a5-1b8d-451c ` | ` jane.kim@segment.com ` | ` source_2 ` | ` event_4 ` | 2022-06-22 10:48:00|
154160
161+ </div >
162+
155163All these events were performed by the same person. If you use these tables to assemble your data models, though, always join them against` id_graph ` to resolve each event’s` canonical_segment_id ` .
156164
157165