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
+61-18Lines changed: 61 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,6 @@ hidden: true
6
6
7
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.
8
8
9
-
10
9
Define relationships between data from your warehouse to give marketers access to data to target, personalize, and analyze customer experiences.
11
10
12
11
> success ""
@@ -16,9 +15,9 @@ Define relationships between data from your warehouse to give marketers access t
16
15
17
16
To use the Data Graph, you'll need the following:
18
17
- A Unify and Engage Foundations or Premier plan.
19
-
- Workspace owner or Unify Read-only/Admin and Entities Admin permissions.
20
18
- A Snowflake Data Warehouse.
21
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
+
- An [Actions-based Destination](/docs/connections/destinations/actions/#available-actions-based-destinations)
22
21
- A Braze, Customer.io, or Iterable Destination. <!-- are we supporting all destination actions here? -->
23
22
24
23
@@ -30,13 +29,14 @@ To use the Data Graph, you'll need the following:
30
29
31
30
## Step 1: Set up your data warehouse
32
31
33
-
Before setting up the Data Graph, you'll need to set up your data warehouse. Use the setup guides below to get started:
32
+
Before setting up the Data Graph, you'll need to set up your data warehouse. Use the [Snowflake Setup](/docs/unify/linked-profiles/setup-guides/snowflake-setup/) guide to get started.
Linked Profiles uses [Segment's Reverse ETL](#) infrastructure to pull data from your warehouse.
39
+
Linked Profiles uses [Segment's Reverse ETL](/docs/connections/reverse-etl/) infrastructure to pull data from your warehouse.
40
40
41
41
To track what data has been sent to Segment on previous syncs, Segment stores delta/diffs in tables within a single schema called `_segment_reverse_etl` within your data warehouse.
42
42
@@ -83,10 +83,15 @@ Use the parameters, defintions, and examples below to help you define entities.
83
83
84
84
#### Profile
85
85
86
-
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. The parameters are:
86
+
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.
|`profile_folder`| This is the folder or schema location for the profile tables. |
93
+
|`materialization`| Identify the type of materialization (`dbt`,`segment`,`none`). |
87
94
88
-
-`profile_folder`: This is the folder or schema location for the profile tables.
89
-
-`materialization`: Identify the type of materialization (`dbt`,`segment`,`none`).
90
95
91
96
```python
92
97
#define a profile entity
@@ -100,13 +105,17 @@ profile {
100
105
101
106
#### Entity
102
107
103
-
An entity is a stateful representation of a business object. The entity corresponds to a table in the warehouse that represents that entity. The parameters are:
108
+
An entity is a stateful representation of a business object. The entity corresponds to a table in the warehouse that represents that entity.
|`entity`| A unique slug for the entity, which is immutable and treated as a delete if you make changes. The slug must be in all lowercase, and supports dashes or underscores (for example, `account-entity` or `account_entity`). |
114
+
|`name`| A unique label which will display across the app. |
115
+
|`table_ref`| Define the table reference. In order to specify a connection to your table in snowflake, a fully qualified table reference is required `[database name].[schema name].[table name]`. |
116
+
|`primary_key`| This is the unique identifier for the given table and should be a column with unique values per row. |
117
+
| (Optional) `enrichment_enabled = true | Indicate if you plan to also reference the entity table for [Linked Events](/docs/unify/linked-profiles/linked-events/). |
104
118
105
-
-`entity`: A unique slug for the entity, which is immutable and treated as a delete if you make changes. The slug must be in all lowercase, and supports dashes or underscores (for example, `account-entity` or `account_entity`).
106
-
-`name`: A unique label which will display across the app.
107
-
-`table_ref`: Define the table reference. In order to specify a connection to your table in snowflake, a fully qualified table reference is required `[database name].[schema name].[table name]`.
108
-
-`primary_key`: This is the unique identifier for the given table and should be a column with unique values per row.
109
-
- (Optional) `enrichment_enabled = true`: Indicate if you plan to also reference the entity table for [Linked Events](/docs/unify/linked-profiles/linked-events/).
110
119
111
120
112
121
```python
@@ -128,9 +137,16 @@ Use the following relationship, parameters, and examples to help you relate enti
|`relationship`| A unique slug for the relationship, which is immutable and treated as a delete if you make changes. The slug must be in all lowercase and will support dashes or underscores (for example, `user-account` or `user_account`). |
143
+
|`name`| This should be a unique label that displays throughout your Segment space. |
144
+
| ``related_entity` | Reference your already defined entity. |
145
+
146
+
<!-- remove
131
147
- `relationship`: A unique slug for the relationship, which is immutable and treated as a delete if you make changes. The slug must be in all lowercase and will support dashes or underscores (for example, `user-account` or `user_account`).
132
148
- `name`: This should be a unique label that displays throughout your Segment space.
133
-
-`related_entity`: Reference your already defined entity.
149
+
- `related_entity`: Reference your already defined entity.-->
134
150
135
151
A profile can be related to an entity in two ways:
136
152
1. With an `external_id`: Define the external ID that will be used to join the profile with your entity.
|`relationship`| A unique slug for the relationship, which is immutable and treated as a delete if you make changes. The slug must be in all lowercase and will support dashes or underscores (for example, `user-account` or `user_account`). |
196
+
|`name`| This should be a unique label that displays throughout your Segment space. |
197
+
|`related_entity`| Reference your already defined entity. |
198
+
|`join_on`| Define relationships between two entity tables `[lefty entity name].[column name] = [right entity name].[column name]`. Note that the entity name is a reference to the alias provided in the config and doesn't need to be the fully qualified table name. |
199
+
200
+
<!-- remove
177
201
- `relationship`: A unique slug for the relationship, which is immutable and treated as a delete if you make changes. The slug must be in all lowercase and will support dashes or underscores (for example, `user-account` or `user_account`).
178
202
- `name`: A unique label that displays athroughout your Segment space.
179
203
- `related_entity`: Reference the slug of your already defined entity.
180
204
- `join_on`: Define relationships between two entity tables `[lefty entity name].[column name] = [right entity name].[column name]`.
181
205
- Note that the entity name is a reference to the alias provided in the config and doesn't need to be the fully qualified table name.
206
+
-->
182
207
183
208
```py
184
209
data_graph {
@@ -199,13 +224,16 @@ data_graph {
199
224
```
200
225
201
226
If you're relating entities with a junction table:
227
+
202
228
-`Junction_table`: Define relationships between two entities tables joined by a junction table.
203
229
-`table_ref`: Define the table reference to the join table. In order to specify a connection to your table in Snowflake, a fully qualified table reference is required `[database name].[schema name].[table name]`
204
230
-`primary_key`: The unique identifier on the join table and should be a column with unique values per row.
205
231
-`left_join_on`: Define relationship between the two entity tables `[left entity name].[column name] = [junction table column name]`.
206
232
-`right_join_on`: Define relationship between the two entity tables `[junction table column name] = [right entity name].[column name]`.
207
-
- Note that schema.table is implied within the junction table column name and doesn't need to be provided.
208
-
- 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.
233
+
234
+
Note that schema.table is implied within the junction table column name and doesn't need to be provided.
235
+
236
+
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.
209
237
210
238
```py
211
239
#relating entities with junction table
@@ -233,7 +261,7 @@ data_graph {
233
261
234
262
```
235
263
236
-

264
+

237
265
238
266
```py
239
267
data_graph {
@@ -297,6 +325,21 @@ data_graph {
297
325
298
326
Validate your Data Graph using the config builder and preview, then click **Save**.
299
327
328
+
## Editing your Data Graph
329
+
330
+
To edit your Data Graph:
331
+
332
+
1. Navigate to **Unify > Data Graph**.
333
+
2. Select the **Builder** tab and click **Edit Data Graph**.
334
+
335
+
You can edit your Data Graph at any time. However, some types of edits may impact existing Linked Audiences and Linked Events. These include:
336
+
337
+
- Adding a new relationship before an existing relationship
338
+
- Replacing existing relationships with new relationships
339
+
- Deleting existing entities or relationships
340
+
341
+
If you make one of these edits, recreate your existing Linked Audiences and/or remove the entity from your existing Linked Events mappings.
342
+
300
343
## Next steps
301
344
302
345
After you've set up your Data Graph, get started with [Linked Audiences](/docs/unify/linked-profiles/linked-audiences/) and [Linked Events](/docs/unify/linked-profiles/linked-events/).
0 commit comments