Skip to content

Commit aacee69

Browse files
authored
Merge pull request #6688 from segmentio/data_graph_demo_updates
data graph updates for demo
2 parents 6f7eb65 + 2d34cbb commit aacee69

File tree

1 file changed

+41
-55
lines changed

1 file changed

+41
-55
lines changed

src/unify/linked-profiles/data-graph.md

Lines changed: 41 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -6,92 +6,73 @@ hidden: true
66
---
77

88
> 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.
1010
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.
1212

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/).
1414

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"}.
1716

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.
2619
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.
2822
2923
## Prerequisites
3024

3125
To use the Data Graph, you'll need the following:
26+
3227
- A supported data warehouse.
3328
- [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.
4030

4131
## Step 1: Set up required permissions in your data warehouse
4232

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+
4435
- [Snowflake](/docs/unify/linked-profiles/setup-guides/snowflake-setup/) is supported by both Linked Events and Linked Audiences.
4536
- [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.
4637

4738
Linked Profiles uses [Segment's Reverse ETL](/docs/connections/reverse-etl/) infrastructure to pull data from your warehouse.
4839

4940
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.
5041

51-
5242
## Step 2: Connect your warehouse to the Data Graph
5343

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-
6044
To connect your warehouse to the Data Graph:
6145

6246
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.
6448
2. Click **Connect warehouse**.
6549
3. Select your warehouse type.
66-
- Note that Linked Audiences only supports Snowflake.
50+
**Note:** Linked Audiences only supports Snowflake.
6751
4. Enter your warehouse credentials.
6852
5. Test your connection, then click **Save**.
6953

7054
## Step 3: Build your Data Graph
7155

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.
7857

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
7961

8062
### Define entities
8163

8264
Use the parameters, definitions, and examples below to help you define entities.
8365

84-
8566
#### Profile
8667

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.
8869

8970
The parameters are:
9071

9172
| Parameters | Definition |
9273
| ----------- | --------------------------------------------------------------------- |
9374
| `profile_folder` | This is the fully qualified path of the folder or schema location for the profile tables. |
94-
| `materialization` | Identifies the type of materialization (`none`). |
75+
| `type` | Identifies the materialization methods of the profile tables (`segment:unmaterialized`, `segment:materialized`, `segment:dbt`). **Note:** Leveraging materialized profile tables optimizes warehouse compute costs. |
9576

9677
Example:
9778

@@ -100,7 +81,7 @@ Example:
10081

10182
profile {
10283
profile_folder = "PRODUCTION.segment"
103-
materialization = "none"
84+
type = segment:materialized
10485

10586
}
10687
```
@@ -142,7 +123,6 @@ profile {
142123

143124
Use the following relationship, parameters, and examples to help you relate entities.
144125

145-
146126
#### Relate Entity to Profile
147127

148128
| Parameters | Definition |
@@ -234,7 +214,7 @@ data_graph {
234214

235215
#### Relating entities with a junction table
236216

237-
If you're relating entities with a junction table:
217+
If you're relating entities with a junction table:
238218

239219
| Parameters | Definition |
240220
| ----------- | --------------------------------------------------------------------- |
@@ -244,10 +224,10 @@ If you're relating entities with a junction table:
244224
| `left_join_on` | Defines the relationship between the two entity tables: `[left entity name].[column name] = [junction table column name]`. |
245225
| `right_join_on` | Defines the relationship between the two entity tables: `[junction table column name] = [right entity name].[column name]`. |
246226

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.
248228

249229
> 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.
251231

252232
Example:
253233

@@ -275,18 +255,22 @@ data_graph {
275255
}
276256

277257
```
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
279263

280264
<img src="/docs/unify/images/data-graph-example.png" alt="An example of a Data Graph" width="5888"/>
281265

282266
```py
283267
data_graph {
284-
version = "v0.0.6"
268+
version = "v1.0.0"
285269

286-
#define a profile entity
270+
#define a profile entity
287271
profile {
288272
profile_folder = "PRODUCTION.segment"
289-
materialization = "none"
273+
type = "segment: materialized"
290274

291275
#relate accounts to profiles with an external ID
292276
relationship "user-accounts" {
@@ -342,11 +326,6 @@ data_graph {
342326
}
343327

344328
```
345-
346-
## Validate your Data Graph
347-
348-
Validate your Data Graph using the config builder and preview, then click **Save**.
349-
350329
## Edit your Data Graph
351330

352331
To edit your Data Graph:
@@ -356,7 +335,14 @@ To edit your Data Graph:
356335

357336
A data consumer refers to a Segment feature referencing entities and relationships from the Data Graph.
358337

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.
360341

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
362347

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

Comments
 (0)