Skip to content

Commit 7c9c370

Browse files
authored
Merge pull request #4927 from segmentio/profile-trait-updates-table
Add profile_traits_updates table
2 parents f4b74f1 + 97ff865 commit 7c9c370

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

src/unify/files/ERD.png

52.1 KB
Loading

src/unify/profiles-sync/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Profiles Sync sends profiles to your warehouse on an hourly basis, beginning aft
110110
111111
When Segment runs historical backfills:
112112

113-
- The `id_graph_updates` and `external_id_mapping_updates` tables sync your entire historical data to your warehouse.
113+
- The `id_graph_updates`, `external_id_mapping_updates`, and `profile_traits_updates` tables sync your entire historical data to your warehouse.
114114
- Profiles Sync gathers the last two months of all events, including those from the `identities`, `page`, `screens`, and `tracks` tables, and syncs them to your warehouse.
115115

116116
Segment lands the data on an internal staging location, then removes the backfill banner. Segment then syncs the backfill data to your warehouse.

src/unify/profiles-sync/tables.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,19 @@ The anonymous site visits sample used earlier would generate the following event
146146

147147
In this table, Segment shows three observed identifiers. For each of the three identifiers, Segment outputs the Segment ID initially associated with the identifier.
148148

149+
### The profile_traits_updates table
150+
151+
The `profile_traits_updates` table maps each `segment_id` with all associated profile traits.
152+
153+
Segment updates this table:
154+
- for each identify call that updates one or more traits for a `segment_id`.
155+
- for any merge where traits from two previously separated profiles are now combined.
156+
157+
In the event that two profiles merge, Segment only updates the `profile_traits_updates` table for the `canonical_segment_id`, or the fully merged id.
158+
159+
From the `profile_traits_updates` table, use Segment's [open-source dbt models](https://github.com/segmentio/profiles-sync-dbt){:target="_blank"}, or your own tools to materialize the [`profile_traits`](#the-profile-traits-table) table with all profiles and associated profile traits in your data warehouse.
160+
161+
149162
### The identifies, page, screens, and track tables
150163

151164
These tables show the instrumented events themselves. Entries in these tables reflect payloads that you instrument according to the Segment spec.
@@ -181,9 +194,11 @@ And two entries in the `identifies` table:
181194

182195
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`.
183196

197+
184198
> info ""
185199
> You might see columns appended with `hidden_entry` or `hidden_entry_joined_at` in profile data of users in Journeys. Segment uses these for internal purposes, and they do not require any attention or action.
186200
201+
187202
### Profiles Sync schema
188203

189204
Profiles Sync uses the following schema: `<profiles_space_name>.<tableName>`.

0 commit comments

Comments
 (0)