Skip to content

Commit 963c5e6

Browse files
committed
More Data Graph updates
1 parent 590c4a0 commit 963c5e6

File tree

1 file changed

+61
-18
lines changed

1 file changed

+61
-18
lines changed

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

Lines changed: 61 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ hidden: true
66

77
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.
88

9-
109
Define relationships between data from your warehouse to give marketers access to data to target, personalize, and analyze customer experiences.
1110

1211
> success ""
@@ -16,9 +15,9 @@ Define relationships between data from your warehouse to give marketers access t
1615

1716
To use the Data Graph, you'll need the following:
1817
- A Unify and Engage Foundations or Premier plan.
19-
- Workspace owner or Unify Read-only/Admin and Entities Admin permissions.
2018
- A Snowflake Data Warehouse.
2119
- [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)
2221
- A Braze, Customer.io, or Iterable Destination. <!-- are we supporting all destination actions here? -->
2322

2423

@@ -30,13 +29,14 @@ To use the Data Graph, you'll need the following:
3029
3130
## Step 1: Set up your data warehouse
3231

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

35-
- [Snowflake Setup](/docs/unify/linked-profiles/setup-guides/snowflake-setup/)
34+
<!-- Not yet available for Data Graph as of 1/16/24
3635
- [Redshift Setup]((/docs/unify/linked-profiles/setup-guides/redshift-setup/))
3736
- [BigQuery Setup]((/docs/unify/linked-profiles/setup-guides/bigquery-setup/))
37+
-->
3838

39-
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.
4040

4141
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.
4242

@@ -83,10 +83,15 @@ Use the parameters, defintions, and examples below to help you define entities.
8383
8484
#### Profile
8585

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.
87+
88+
The parameters are:
89+
90+
| Parameters | Definition |
91+
| ----------- | --------------------------------------------------------------------- |
92+
| `profile_folder` | This is the folder or schema location for the profile tables. |
93+
| `materialization` | Identify the type of materialization (`dbt`,`segment`,`none`). |
8794

88-
- `profile_folder`: This is the folder or schema location for the profile tables.
89-
- `materialization`: Identify the type of materialization (`dbt`,`segment`,`none`).
9095

9196
```python
9297
#define a profile entity
@@ -100,13 +105,17 @@ profile {
100105

101106
#### Entity
102107

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.
109+
110+
111+
| Parameters | Definition |
112+
| ----------- | --------------------------------------------------------------------- |
113+
| `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/). |
104118

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

111120

112121
```python
@@ -128,9 +137,16 @@ Use the following relationship, parameters, and examples to help you relate enti
128137
129138
#### Relate Entity to Profile
130139

140+
| Parameters | Definition |
141+
| ----------- | --------------------------------------------------------------------- |
142+
| `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
131147
- `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`).
132148
- `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. -->
134150

135151
A profile can be related to an entity in two ways:
136152
1. With an `external_id`: Define the external ID that will be used to join the profile with your entity.
@@ -174,11 +190,20 @@ data_graph {
174190

175191
#### Relate between entities
176192

193+
| Parameters | Definition |
194+
| ----------- | --------------------------------------------------------------------- |
195+
| `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
177201
- `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`).
178202
- `name`: A unique label that displays athroughout your Segment space.
179203
- `related_entity`: Reference the slug of your already defined entity.
180204
- `join_on`: Define relationships between two entity tables `[lefty entity name].[column name] = [right entity name].[column name]`.
181205
- 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+
-->
182207

183208
```py
184209
data_graph {
@@ -199,13 +224,16 @@ data_graph {
199224
```
200225

201226
If you're relating entities with a junction table:
227+
202228
- `Junction_table`: Define relationships between two entities tables joined by a junction table.
203229
- `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]`
204230
- `primary_key`: The unique identifier on the join table and should be a column with unique values per row.
205231
- `left_join_on`: Define relationship between the two entity tables `[left entity name].[column name] = [junction table column name]`.
206232
- `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.
209237

210238
```py
211239
#relating entities with junction table
@@ -233,7 +261,7 @@ data_graph {
233261

234262
```
235263

236-
![An example of a data graph](images/data-graph-example.png)
264+
![An example of a data graph](/docs/unify/images/data-graph-example.png)
237265

238266
```py
239267
data_graph {
@@ -297,6 +325,21 @@ data_graph {
297325

298326
Validate your Data Graph using the config builder and preview, then click **Save**.
299327

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+
300343
## Next steps
301344

302345
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

Comments
 (0)