1
1
---
2
2
title : Profiles Sync Tables and Materialized Views
3
3
beta : true
4
+ plan : profiles
4
5
---
5
6
6
7
Through 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
90
91
91
92
Using the profile merge scenario, Segment would generate three new entries to this table:
92
93
94
+ <div style =" overflow-x :auto ;" markdown =1 >
95
+
93
96
| ` segment_id ` | ` canonical_segment_id ` | ` triggering_event_type ` | ` triggering_event_id ` | ` timestamp ` |
94
97
| ------------ | ---------------------- | ----------------------- | --------------------- | ------------------- |
95
98
| ` profile_1 ` | ` profile_1 ` | ` page ` | ` event_1 ` | 2022-05-02 14:01:00 |
96
99
| ` profile_2 ` | ` profile_2 ` | ` page ` | ` event_3 ` | 2022-06-22 10:47:15 |
97
100
| ` profile_2 ` | ` profile_1 ` | ` identify ` | ` event_4 ` | 2022-06-22 10:48:00 |
98
101
102
+ </div >
103
+
99
104
In this example, the table shows ` profile_2 ` mapping to two places: first to itself, then, later, to ` profile_1 ` after the merge occurs.
100
105
101
106
#### Recursive entries
@@ -110,20 +115,15 @@ This table maps Segment-generated identifiers, like `segment_id`, to external id
110
115
111
116
The anonymous site visits sample used earlier would generate the following events:
112
117
118
+ <div style =" overflow-x :auto ;" markdown =1 >
119
+
113
120
| ` segment_id ` | ` canonical_segment_id ` | ` triggering_event_type ` | ` triggering_event_id ` | ` timestamp ` |
114
121
| ------------ | ---------------------- | ----------------------- | --------------------- | ------------------- |
115
122
| ` profile_1 ` | ` profile_1 ` | ` page ` | ` event_1 ` | 2022-05-02 14:01:00 |
116
123
| ` profile_2 ` | ` profile_2 ` | ` page ` | ` event_3 ` | 2022-06-22 10:47:15 |
117
124
| ` profile_2 ` | ` profile_1 ` | ` identify ` | ` event_4 ` | 2022-06-22 10:48:00 |
118
125
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 >
127
127
128
128
In this table, Segment shows three observed identifiers. For each of the three identifiers, Segment outputs the Segment ID initially associated with the identifier.
129
129
@@ -140,18 +140,26 @@ These event tables are similar to the tables landed by Segment warehouse integra
140
140
141
141
The previous result would generate two entries in the ` pages ` table:
142
142
143
+ <div style =" overflow-x :auto ;" markdown =1 >
144
+
143
145
| ` segment_id ` | ` context_url ` | ` anonymous_id ` | ` event_source_id ` | ` event_id ` | ` timestamp ` |
144
146
| ------------ | ---------------------- | -------------------- | ----------------- | ---------- | ------------------- |
145
147
| ` profile_1 ` | ` twilio.com ` | ` 5285bc35-05ef-4d21 ` | ` source_1 ` | ` event_1 ` | 2022-05-02 14:01:00 |
146
148
| ` profile_2 ` | ` twilio.com/education ` | ` b50e18a5-1b8d-451c ` | ` source_1 ` | ` event_3 ` | 2022-06-22 10:47:15 |
147
149
150
+ </div >
151
+
148
152
And two entries in the ` identifies ` table:
149
153
154
+ <div style =" overflow-x :auto ;" markdown =1 >
155
+
150
156
| ` segment_id ` | ` context_url ` | ` anonymous_id ` | ` email ` | ` event_source_id ` | ` event_id ` | ` timestamp ` |
151
157
| ------------ | ---------------------------- | -------------------- | ---------------------- | ----------------- | ---------- | ------------------- |
152
158
| ` profile_1 ` | ` twilio.com/try_twilio ` | ` 5285bc35-05ef-4d21 ` | ` [email protected] ` | ` source_1 ` | ` event_2 ` | 2022-05-02 14:01:47
|
153
159
| ` profile_2 ` | ` twilio.com/events/webinars ` | ` b50e18a5-1b8d-451c ` | ` [email protected] ` | ` source_2 ` | ` event_4 ` | 2022-06-22 10:48:00
|
154
160
161
+ </div >
162
+
155
163
All 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 ` .
156
164
157
165
0 commit comments