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/linked-profiles/data-graph.md
+52-36Lines changed: 52 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,22 +4,19 @@ plan: unify
4
4
beta: true
5
5
---
6
6
7
-
With Linked Profiles, you can build a Data Graph that defines relationships between any data set in the warehouse and the Segment Profiles you send with Profiles Sync.
7
+
With Linked Profiles, you can build a Data Graph that defines relationships between any entity data set in the warehouse and the Segment Profiles you send with Profiles Sync.
8
8
9
-
Define relationships between data from your warehouse to give marketers access to data to target, personalize, and analyze customer experiences.
9
+
Make this relational data accessible to marketers and business stakeholders to empower them with the data they need to create targeted and personalized customer engagements.
10
10
11
11
> success ""
12
12
> Segment's Data Graph powers [Linked Events](/docs/unify/linked-profiles/linked-events/) and [Linked Audiences](/docs/unify/linked-profiles/linked-audiences/).
13
13
14
14
## Prerequisites
15
15
16
16
To use the Data Graph, you'll need the following:
17
-
- A Unify and Engage Foundations or Premier plan.
18
17
- A Snowflake Data Warehouse.
19
-
-[Profiles Sync](/docs/unify/profiles-sync/) set up with ready to use [data models and tables](/docs/unify/profiles-sync/tables/) in your warehouse.
20
18
- An [Actions-based Destination](/docs/connections/destinations/actions/#available-actions-based-destinations).
21
19
22
-
23
20
> info ""
24
21
> Linked Profiles follows Zero Copy principles, and doesn't copy entities to store in Segment. Segment stores and processes all data in the United States.
25
22
@@ -42,6 +39,9 @@ To track what data has been sent to Segment on previous syncs, Segment stores de
42
39
43
40
## Step 2: Connect your warehouse to the Data Graph
44
41
42
+
> warning "Segment user permissions"
43
+
> You must have Workspace Owner or Unify Read-only/Admin and Entities Admin permissions to set up Linked Profiles.
44
+
45
45
> success ""
46
46
> Before getting started with the Data Graph, be sure to [set up your Snowflake permissions](/unify/linked-profiles/setup-guides/snowflake-setup/).
47
47
@@ -54,8 +54,6 @@ To connect your warehouse to the Data Graph:
54
54
4. Enter your warehouse credentials.
55
55
5. Test your connection, then click **Save**.
56
56
57
-
Depending on the size of your warehouse, it may take anywhere from a few minutes to an hour for Segment to sync your warehouse metadata to cache before you're able to set up your Data Graph.
58
-
59
57
## Step 3: Build your Data Graph
60
58
61
59
The Data Graph is a semantic layer that represents a subset of relevant business data that you'll use for audience targeting and personalization in downstream tools.
@@ -67,7 +65,7 @@ Use the configuration language spec below to add models to build your Data Graph
67
65
> info ""
68
66
> Each Unify space has one Data Graph. The current version is v0.0.6.
69
67
70
-
Segment recommends creating a new Linked Audience or Linked Event. Deleting and/or editing entities in the Data Graph may lead to errors if you reference these entities or relationships in existing Linked Audiences and Linked Events.
68
+
Segment recommends creating a new Linked Audience or Linked Event. Deleting entities and relationships are not yet supported. Editing entities and relationships in the Data Graph may lead to errors if these entities or relationships are referenced in existing Linked Audiences and Linked Events.
71
69
72
70
While you can delete relationships or entities from the Data Graph, these relationships and entities will still display in the Linked Audience builder and Linked Events.
73
71
@@ -80,7 +78,7 @@ Use the parameters, defintions, and examples below to help you define entities.
80
78
81
79
#### Profile
82
80
83
-
The profile is a special class of entity. The profile is always defined at the top of the Data Graph, and there can only be one profile for a Data Graph. The profile entity corresponds to the Profiles Sync tables and models.
81
+
The profile is a special class of entity. The profile is always defined at the top of the Data Graph, and there can only be one profile for a Data Graph. The profile entity corresponds to the Profiles Sync tables and models, such as profile traits.
84
82
85
83
The parameters are:
86
84
@@ -118,8 +116,9 @@ An entity is a stateful representation of a business object. The entity correspo
118
116
```python
119
117
# Define an entity and optionally indicate if the entity will be referenced for Linked Events (event enrichment)
120
118
121
-
entity "account" {
122
-
table_ref = "cust.account"
119
+
entity "account-entity" {
120
+
name = "account"
121
+
table_ref = "PRODUCTION.CUST.ACCOUNT"
123
122
primary_key = "id"
124
123
enrichment_enabled = true
125
124
}
@@ -132,7 +131,7 @@ Use the following relationship, parameters, and examples to help you relate enti
132
131
> warning ""
133
132
> Snowflake schemas are case sensitive, so you'll need to reflect the schema, table, and column names based on how you case them in Snowflake.
134
133
135
-
134
+
<!--Bookmark -->
136
135
#### Relate Entity to Profile
137
136
138
137
| Parameters | Definition |
@@ -144,7 +143,14 @@ Use the following relationship, parameters, and examples to help you relate enti
144
143
145
144
A profile can be related to an entity in two ways:
146
145
1. With an `external_id`: Define the external ID that will be used to join the profile with your entity.
147
-
-`type`: Identify the external ID type (`email`, `phone`, `user id`). This corresponds to the `external_id_type` column in your `external_id_mapping` table.
146
+
-`type`: Identify the external ID type (`email`, `phone`, `user id`). This corresponds to the `external_id_type` column in your `external_id_mapping` table. For example:
147
+
```python
148
+
relationship "user-carts" {
149
+
name = "Shopping Carts"
150
+
related_entity = "cart-entity"
151
+
join_on = "ACCOUNT.ID = CART.ACCOUNT.ID"
152
+
}
153
+
```
148
154
-`join_key`: This is the column on the entity table that you are matching to the external identifier.
149
155
2. With a `trait`: Define a profile trait that will be used to join the profile with your entity.
150
156
-`name`: The trait name that corresponds to a column name in your `profile_traits_updates` table.
@@ -209,6 +215,8 @@ data_graph {
209
215
210
216
```
211
217
218
+
#### relating entities with a junction table
219
+
212
220
If you're relating entities with a junction table:
213
221
214
222
-`Junction_table`: Define relationships between two entities tables joined by a junction table.
@@ -219,7 +227,8 @@ If you're relating entities with a junction table:
219
227
220
228
Note that `schema.table` is implied within the junction table column name and doesn't need to be provided.
221
229
222
-
Attributes from a junction table are not referenceable with the Audience Builder. If you'd like to reference an additional column on the junction table for filtering, you must first define it as an entity and explicitly define a relationship name.
230
+
> warning ""
231
+
> Attributes from a junction table are not referenceable with the Audience Builder. If you'd like to reference an additional column on the junction table for filtering, you must first define it as an entity and explicitly define a relationship name.
0 commit comments