You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/unify/profiles-sync/tables.md
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -232,17 +232,18 @@ You can also use [historical backfill](/docs/unify/profiles-sync/#using-historic
232
232
233
233
### The user_traits table
234
234
235
-
With the `user_traits` table, you'll see a complete user profile that combines Profiles Sync data with external data sources such as customer purchase history, product usage, and more.
235
+
With the `user_traits` table, you'll see all traits that belong to a profile, represented by the `canonical_segment_id`. Use this table for a complete picture of your Profiles Sync data with external data sources such as customer purchase history, product usage, and more.
236
236
237
-
The `user_traits` table contains all traits that belong to a profile represented by the `canonical_segment_id`.
238
237
- This view is a fixed schema, and contains a row for each trait associated with the profile.
239
-
-If new traits are added to the profile, new rows are added to the view.
238
+
-As new traits are added to the profile, new rows are added to the table.
240
239
241
240
When a merge occurs, two things happen:
242
-
1. Segment deletes the **merge from** profile in the view, along with with all the traits that belong to it.
243
-
2. Segment updates the **merge to** profile with the traits from the **merge to** profile.
241
+
1. Segment deletes the **merge from** profile in the table, along with with all the traits that belong to it.
242
+
2. Segment updates the **merge to** profile with the traits from the **merge from**, or previously deleted profile.
243
+
- For any conflicting traits, Segment appends the most recent trait to the profile.
244
244
245
-
The `user_traits` table has the following columns:
@@ -257,15 +258,15 @@ The `user_traits` table has the following columns:
257
258
258
259
### The user_identifiers table
259
260
260
-
The `user_identifiers` table contains all external id values that map to a profile which is represented by the `canonical_segment_id`.
261
+
The `user_identifiers` table contains all external ID values that map to a profile, which is represented by the `canonical_segment_id`.
261
262
262
263
With the `user_identifiers` table:
263
264
- There's one row per identifier associated with the profile. This view has a fixed schema.
264
-
- As new identifiers are added to a profile, new rows are added to the view.
265
+
- As new identifiers are added to a profile, new rows are added to the table.
265
266
266
267
When a merge occurs:
267
268
1. Segment deletes the **merge from** profile in the view, along with all associated identifiers.
268
-
2. Segment updates the **merge to** profile with the identifiers that previously belonged to the **merge to** profile.
269
+
2. Segment updates the **merge to** profile with the identifiers that belonged to the **merge from**, or previously deleted profile.
269
270
270
271
This table has the following columns:
271
272
@@ -282,18 +283,18 @@ This table has the following columns:
282
283
283
284
### The profile_merges table
284
285
285
-
The `profile_merges` table contains all mappings from a `canonical_segment_id` to a `segment_id` to a profile which is represented by the `canonical_segment_id`.
286
+
The `profile_merges` table contains all mappings from a `segment_id` to a profile, represented by the `canonical_segment_id`. This mapping indicates that a profile has been created within Segment.
286
287
287
-
With the profile_merges table:
288
+
With the `profile_merges` table:
288
289
- There's one row per profile associated with the `canonical_segment_id` that represents the profile. This view is a fixed schema.
289
290
- When a profile is created, a new row is created with the `segment_id` and `segment_canonical_id` having the same value.
290
291
291
292
292
293
When a merge occurs:
293
294
1. Segment deletes the **merge from** profile, along with all Segment IDs that belong to it.
294
-
2. Segment updates the **merge to** profile with Segment IDs that previously belonged to the **merge to** profile.
295
+
2. Segment updates the **merge to** profile with Segment IDs that previously belonged to the **merge from**, or previously deleted profile.
295
296
296
-
The `profile_merges` table has the following columns:
0 commit comments