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/data-graph/data-graph.md
+20-13Lines changed: 20 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,18 @@ redirect_from:
7
7
- '/unify/linked-profiles/data-graph'
8
8
---
9
9
10
-
The Data Graph is a semantic layer unifying all your customer datasets, enabling you to define relationships between any entity data set in the warehouse (i.e. accounts, subscriptions, households, products, etc) with the Segment Profiles you send with Profiles Sync. Once defined, the Data Graph allows you to make this rich relational data accessible to marketers and business stakeholders to empower them to create targeted and personalized customer engagements.
10
+
The Data Graph is a semantic layer unifying all your customer datasets, enabling you to define relationships between any entity data set in the warehouse (i.e. accounts, subscriptions, households, products, etc.) with the Segment Profiles you send with [Profiles Sync](/docs/unify/profiles-sync/). Once defined, the Data Graph allows you to make this rich relational data accessible to marketers and business stakeholders to empower them to create targeted and personalized customer engagements.
11
11
-**[Linked Audiences](/docs/engage/audiences/linked-audiences/)**: Enables marketers to self-serve and build targeting logic based on any data sets defined in the Data Graph unlocking a world of new hyper-personalized campaigns.
12
12
-**[Linked Events](/docs/unify/data-graph/linked-events/)**: Enables data teams to enrich event streams, in real time, with any data set coming from a data warehouse or data lake, and send those enriched events to any Destination. Available for Destinations Actions and Functions.
13
13
14
14
## Prerequisites
15
15
16
16
To use the Data Graph, you'll need the following:
17
17
18
-
- A supported data warehouse
19
-
- If using Linked Audiences, [Profiles Sync](/docs/unify/profiles-sync/) will need to be set up with ready-to-use [data models and tables](/docs/unify/profiles-sync/tables/) in your warehouse. Note: Profiles Sync is not required for Linked Events
18
+
- A supported data warehouse with appropriate Data Graph permissions
19
+
- For Linked Audiences, [Profiles Sync](/docs/unify/profiles-sync/) will need to be set up for a Unify space with ready-to-use [data models and tables](/docs/unify/profiles-sync/tables/) in your warehouse. When setting up selective sync, Segment recommends the following settings for Linked Audiences:
20
+
- Under **Profile materialized tables**, select all the tables (`user_identifier`, `user_traits`, `profile_merges`) for faster and more cost-efficient Linked Audiences computations in your data warehouse.
21
+
- Under **Track event tables**, select "Sync all Track Call Tables" to enable filtering on event history for Linked Audiences conditions.
20
22
- Workspace Owner or Unify Read-only/Admin and Entities Admin permissions
21
23
22
24
## Step 1: Set up Data Graph permissions in your data warehouse
@@ -64,7 +66,7 @@ Similar to the concept of [cardinality in data modeling](/en.wikipedia.org/wiki/
64
66
-**Profile-to-entity relationship:** This is a relationship between your entity table and the Segment Profiles tables, and is the first level of relationship.
65
67
-**1:many relationship:** For example, an `account` can have many `carts`, but each `cart` can only be associated with one `account`.
66
68
-**many:many relationship:** For example, a user can have many `carts`, and each `cart` can have many `products`. However, these `products` can also belong to many `carts`.
67
-
- The Data Graph currently supports 5 levels of relationships starting from the profile. For example, relating the accounts table to the profile block is the first level of relationship, relating a 1:many relationship between the accounts and carts table is the second level of relationship, and so on. There are no limits on the breadth of your Data Graph.
69
+
- The Data Graph currently supports 6 levels of depth (or nodes) starting from the profile. For example, relating the `profile`to the `accounts` table to the `carts` table is 3 levels of depth. There are no limits on the width of your Data Graph or the number of entities.
68
70
- Relationships are nested under the profile. Refer to the example below.
69
71
70
72
**Data Graph Example**
@@ -113,24 +115,27 @@ data_graph {
113
115
profile_folder = "PRODUCTION.SEGMENT"
114
116
type = "segment: materialized"
115
117
116
-
# First branch - relate accounts table to the profile. Unique type of relationship between an entity and the profile block
118
+
# First branch - relate accounts table to the profile
119
+
# This is a unique type of relationship between an entity and the profile block
117
120
relationship "user-accounts" {
118
121
name = "Premium Accounts"
119
122
related_entity = "account-entity"
120
-
# Join the profile entity with user_id, email, or phone as the identifier on the entity table
123
+
# Join the profile entity with an identifier (e.g. email) on the related entity table
121
124
# Option to replace with the traits block below to join with a profile trait on the entity table instead
122
125
external_id {
123
126
type = "email"
124
127
join_key = "EMAIL_ID"
125
128
}
126
129
127
-
# Define 1:many relationship between accounts and carts (e.g. an account can be associated with many carts)
130
+
# Define 1:many relationship between accounts and carts
131
+
# e.g. an account can be associated with many carts
0 commit comments