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
+41-55Lines changed: 41 additions & 55 deletions
Original file line number
Diff line number
Diff line change
@@ -6,92 +6,73 @@ hidden: true
6
6
---
7
7
8
8
> info "Segment's Data Graph is in public beta"
9
-
> The Data Graph is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.
9
+
> Data Graph is in public beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.
10
10
11
-
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.
11
+
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. 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.
12
12
13
-
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.
13
+
Segment's Data Graph powers [Linked Events](/docs/unify/linked-profiles/linked-events/)and [Linked Audiences](/docs/engage/audiences/linked-audiences/).
14
14
15
-
> info ""
16
-
> Segment's Data Graph powers [Linked Events](/docs/unify/linked-profiles/linked-events/) and [Linked Audiences](/docs/engage/audiences/linked-audiences/).
15
+
To help you get started with the Data Graph, [view this short setup demo](https://drive.google.com/file/d/1oZNvs0raYaxK6tds3OEF0Ri3NGVCoXys/view?pli=1){:target="_blank"}.
17
16
18
-
> success ""
19
-
> To help you get started with the Data Graph, [view this short setup demo](https://drive.google.com/file/d/1oZNvs0raYaxK6tds3OEF0Ri3NGVCoXys/view?pli=1){:target="_blank"}.
20
-
21
-
## Breaking changes
22
-
23
-
A breaking change occurs when deleting an entity or relationship that is being referenced by a data consumer. Note that an entity or relationship slug is immutable and treated as a delete if you make changes. Data consumers affected by breaking changes will fail on the next run.
24
-
25
-
### Potential breaking change
17
+
> > info ""
18
+
> 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.
26
19
27
-
Editing the Data Graph may lead to errors with data consumers. If there’s a breaking change, the data consumer will fail on the next run. Unaffected data consumers will continue to work.
20
+
> warning ""
21
+
> Don't send any personal health information with the Data Graph.
28
22
29
23
## Prerequisites
30
24
31
25
To use the Data Graph, you'll need the following:
26
+
32
27
- A supported data warehouse.
33
28
-[Profiles Sync](/docs/unify/profiles-sync/) set up with ready-to-use [data models and tables](/docs/unify/profiles-sync/tables/) in your warehouse.
34
-
35
-
> info ""
36
-
> 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.
37
-
38
-
> warning ""
39
-
> Don't send any personal health information with the Data Graph.
29
+
- Workspace Owner or Unify Read-only/Admin and Entities Admin permissions.
40
30
41
31
## Step 1: Set up required permissions in your data warehouse
42
32
43
-
To get started, you'll need to navigate to the appropriate guide below to set up the required permissions in your data warehouse:
33
+
To get started, set up the required permissions in your data warehouse using the instructions below:
34
+
44
35
-[Snowflake](/docs/unify/linked-profiles/setup-guides/snowflake-setup/) is supported by both Linked Events and Linked Audiences.
45
36
-[Redshift](/docs/unify/linked-profiles/setup-guides/redshift-setup/) and [BigQuery](/docs/unify/linked-profiles/setup-guides/BigQuery-setup/) are currently supported for Linked Events.
46
37
47
38
Linked Profiles uses [Segment's Reverse ETL](/docs/connections/reverse-etl/) infrastructure to pull data from your warehouse.
48
39
49
40
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` in your data warehouse. You can choose which database/project in your warehouse this data lives in.
50
41
51
-
52
42
## Step 2: Connect your warehouse to the Data Graph
53
43
54
-
> warning "Segment user permissions"
55
-
> You must have Workspace Owner or Unify Read-only/Admin and Entities Admin permissions to set up Linked Profiles.
56
-
57
-
> success ""
58
-
> Before getting started with the Data Graph, be sure to set up your warehouse permissions.
59
-
60
44
To connect your warehouse to the Data Graph:
61
45
62
46
1. Navigate to **Unify > Data Graph**.
63
-
-This should be a Unify space with Profiles Sync already set up.
47
+
This should be a Unify space with Profiles Sync already set up.
64
48
2. Click **Connect warehouse**.
65
49
3. Select your warehouse type.
66
-
-Note that Linked Audiences only supports Snowflake.
50
+
**Note:** Linked Audiences only supports Snowflake.
67
51
4. Enter your warehouse credentials.
68
52
5. Test your connection, then click **Save**.
69
53
70
54
## Step 3: Build your Data Graph
71
55
72
-
> warning ""
73
-
> Warehouse schemas are case sensitive, so you'll need to reflect the schema, table, and column names based on how you case them in the warehouse.
74
-
75
-
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.
76
-
77
-
Use the configuration language spec below to add models to build your Data Graph. The Data Graph currently supports 4 layers of depth, including the Profile entity.
56
+
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. Use the configuration language spec below to add models to build your Data Graph. The Data Graph currently supports 4 layers of depth, including the Profile entity. Warehouse schemas are case sensitive, so you'll need to reflect the schema, table, and column names based on how you case them in the warehouse.
78
57
58
+
To leverage the Data Graph auto-complete feature, begin typing or use the following keyboard shortcuts to autocomplete the profile_folder and table_ref properties.
59
+
- Mac CtrlSpace
60
+
- Windows AltEsc
79
61
80
62
### Define entities
81
63
82
64
Use the parameters, definitions, and examples below to help you define entities.
83
65
84
-
85
66
#### Profile
86
67
87
-
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.
68
+
The profile is a special class of entity that 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.
@@ -244,10 +224,10 @@ If you're relating entities with a junction table:
244
224
|`left_join_on`| Defines the relationship between the two entity tables: `[left entity name].[column name] = [junction table column name]`. |
245
225
|`right_join_on`| Defines the relationship between the two entity tables: `[junction table column name] = [right entity name].[column name]`. |
246
226
247
-
Note that `schema.table`is implied within the junction table column name and doesn't need to be provided.
227
+
**Note:**`schema.table`is implied within the junction table column name and doesn't need to be provided.
248
228
249
229
> warning ""
250
-
> 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
+
> 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.
251
231
252
232
Example:
253
233
@@ -275,18 +255,22 @@ data_graph {
275
255
}
276
256
277
257
```
278
-
## Data Graph Example
258
+
## Step 4: Validate your Data Graph
259
+
260
+
Validate your Data Graph using the config builder and preview, then click **Save**.
261
+
262
+
## Data Graph example
279
263
280
264
<img src="/docs/unify/images/data-graph-example.png" alt="An example of a Data Graph" width="5888"/>
281
265
282
266
```py
283
267
data_graph {
284
-
version = "v0.0.6"
268
+
version = "v1.0.0"
285
269
286
-
#define a profile entity
270
+
#define a profile entity
287
271
profile {
288
272
profile_folder = "PRODUCTION.segment"
289
-
materialization = "none"
273
+
type = "segment: materialized"
290
274
291
275
#relate accounts to profiles with an external ID
292
276
relationship "user-accounts" {
@@ -342,11 +326,6 @@ data_graph {
342
326
}
343
327
344
328
```
345
-
346
-
## Validate your Data Graph
347
-
348
-
Validate your Data Graph using the config builder and preview, then click **Save**.
349
-
350
329
## Edit your Data Graph
351
330
352
331
To edit your Data Graph:
@@ -356,7 +335,14 @@ To edit your Data Graph:
356
335
357
336
A data consumer refers to a Segment feature referencing entities and relationships from the Data Graph.
358
337
359
-
## Next steps
338
+
## Breaking changes
339
+
340
+
A breaking change occurs when deleting an entity or relationship that is being referenced by a data consumer. Note that an entity or relationship slug is immutable and treated as a delete if you make changes. Data consumers affected by breaking changes will fail on the next run.
360
341
361
-
After you've set up your Data Graph, get started with [Linked Audiences](/docs/engage/audiences/linked-audiences/) and [Linked Events](/docs/unify/linked-profiles/linked-events/).
342
+
### Potential breaking change
343
+
344
+
Editing the Data Graph may lead to errors with data consumers. If there’s a breaking change, the data consumer will fail on the next run. Unaffected data consumers will continue to work.
345
+
346
+
## Next steps
362
347
348
+
After you've set up your Data Graph, get started with [Linked Events](/docs/unify/linked-profiles/linked-events/) and [Linked Audiences](/docs/engage/audiences/linked-audiences/).
0 commit comments