Skip to content

Commit 12154f1

Browse files
authored
Update data-graph.md
1 parent e6a15c9 commit 12154f1

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

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

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ The Data Graph is a semantic layer unifying all your customer datasets, enabling
1111
- **[Linked Audiences](/docs/engage/audiences/linked-audiences/)**: Enables marketers to self-serve and build targeting logic based on any data sets defined in the Data Graph unlocking a world of new hyper-personalized campaigns.
1212
- **[Linked Events](/docs/unify/data-graph/linked-events/)**: Enables data teams to enrich event streams, in real time, with any data set coming from a data warehouse or data lake, and send those enriched events to any Destination. Available for Destinations Actions and Functions.
1313

14-
> info ""
15-
> Data Graph currently only supports workspaces in the United States.
16-
1714
## Prerequisites
1815

1916
To use the Data Graph, you'll need the following:
@@ -31,10 +28,13 @@ To get started with the Data Graph, set up the required permissions in your ware
3128
| ----------- | --------------------------------------- | ------------------------------ |
3229
| [Snowflake](/docs/unify/data-graph/setup-guides/snowflake-setup/) |:white_check_mark: | :white_check_mark: |
3330
| [Databricks](/docs/unify/data-graph/setup-guides/databricks-setup/) | :white_check_mark: | :white_check_mark: |
34-
| [Redshift](/docs/unify/data-graph/setup-guides/redshift-setup/) | :x:| :white_check_mark: |
35-
| [BigQuery](/docs/unify/data-graph/setup-guides/BigQuery-setup/) | :x:| :white_check_mark: |
31+
| [Redshift](/docs/unify/data-graph/setup-guides/redshift-setup/) | 📆 Coming soon| :white_check_mark: |
32+
| [BigQuery](/docs/unify/data-graph/setup-guides/BigQuery-setup/) | 📆 Coming soon| :white_check_mark: |
3633

37-
To track what data has been sent to Segment on previous syncs, Segment leverages Reverse ETL infrastructure to store diffs in tables within a single schema called `_segment_reverse_etl` in your data warehouse. You can choose which database or project in your warehouse this data lives in.
34+
> info ""
35+
> Data Graph currently only supports workspaces in the United States.
36+
37+
To track what data has been sent to Segment on previous syncs, Segment leverages [Reverse ETL](/docs/connections/reverse-etl/) infrastructure to store diffs in tables within a single schema called `_segment_reverse_etl` in your data warehouse. You can choose which database or project in your warehouse this data lives in.
3838

3939
## Step 2: Connect your warehouse to the Data Graph
4040

@@ -77,6 +77,7 @@ data_graph {
7777
}
7878
}
7979
relationship "d" {
80+
...
8081
}
8182
}
8283
}
@@ -88,11 +89,11 @@ The first step in creating a Data Graph is to define your entities. An entity co
8889

8990
| Parameters | Definition |
9091
| ----------- | --------------------------------------------------------------------- |
91-
| `entity` | An immutable slug for the entity, and will be treated as a delete if you make changes. The slug must be in all lowercase, and supports dashes or underscores (e.g `account-entity` or `account_entity`) |
92-
| `name` | A label displayed throughout your Segment space for Linked Events, Linked Audiences, etc. This name can be modified at any time |
93-
| `table_ref` | Defines the fully qualified table reference: `[database name].[schema name].[table name]`. Segment flexibly supports tables, views and materialized views |
94-
| `primary_key` | The unique identifier for the given table. Must be a column with unique values per row |
95-
| (Optional) `enrichment_enabled = true` | Add this if you plan to reference the entity table for [Linked Events](/docs/unify/data-graph/linked-events/) use cases |
92+
| `entity` | An immutable slug for the entity, and will be treated as a delete if you make changes. The slug must be in all lowercase, and supports dashes or underscores (e.g `account-entity` or `account_entity`). |
93+
| `name` | A label displayed throughout your Segment space for Linked Events, Linked Audiences, etc. This name can be modified at any time. |
94+
| `table_ref` | Defines the fully qualified table reference: `[database name].[schema name].[table name]`. Segment flexibly supports tables, views and materialized views. |
95+
| `primary_key` | The unique identifier for the given table. Must be a column with unique values per row. |
96+
| (If applicable) `enrichment_enabled = true` | Add this if you plan to reference the entity table for [Linked Events](/docs/unify/data-graph/linked-events/) use cases. |
9697

9798
**Example:**
9899

@@ -121,8 +122,8 @@ Next, define the profile. This is a special class of entity that represents Segm
121122

122123
| Parameters | Definition |
123124
| ----------- | --------------------------------------------------------------------- |
124-
| `profile_folder` | Define the fully qualified path of the folder or schema location for the profile tables |
125-
| `type` | Identify the materialization method of the profile tables defined in your Profiles Sync configuration (`segment:unmaterialized`, `segment:materialized`)|
125+
| `profile_folder` | Define the fully qualified path of the folder or schema location for the profile tables. |
126+
| `type` | Identify the materialization method of the profile tables defined in your Profiles Sync configuration: `segment:unmaterialized` or `segment:materialized`.|
126127

127128
**Example:**
128129

@@ -144,13 +145,13 @@ data_graph {
144145
### c) Define relationships
145146

146147
Now define your relationships between your entities. The Data Graph supports three types of relationships:
147-
- Profile-to-entity relationship. This is the first level of relationships
148+
- Profile:entity relationship. This is the first level of relationships
148149
- 1:many relationship
149150
- Many:many relationship
150151

151-
All relationship types require you to define the relationship slug, label, and related entity. Each type of relationship has unique join on conditions.
152+
All relationship types require you to define the relationship slug, name, and related entity. Each type of relationship has unique join on conditions.
152153

153-
#### Define profile-to-entity relationship
154+
#### Define profile:entity relationship
154155
This is the first level of relationships and a unique type of relationship between Segment profile entity and a related entity.
155156

156157
| Parameters | Definition |
@@ -159,15 +160,19 @@ This is the first level of relationships and a unique type of relationship betwe
159160
| `name` | A label displayed throughout your Segment space for Linked Events, Linked Audiences, etc. This name can be modified at any time |
160161
| `related_entity` | References your already defined entity |
161162

162-
To define a profile-to-entity relationship, choose to join on one of the following:
163+
To define a profile-to-entity relationship, reference your entity table and depending on your table columns, choose to join on one of the following:
163164

164-
**Option 1 (Most common):** Use the `external_id` block to join the profile entity with `user_id`, `email`, or `phone` as the identifier on the entity table
165-
- `type`: Identify the external ID type (`email`, `phone`, `user id`). This corresponds to the `external_id_type` column in your Profiles Sync `external_id_mapping` table
166-
- `join_key`: This is the column on the entity table that you are matching to the external identifier
165+
**Option 1 (Most common):** Use the `external_id` block to join the profile entity with an entity table using external IDs from your [Unify ID resolution](/docs/unify/identity-resolution/externalids/) settings. Typically these identifiers are `user_id`, `email`, or `phone` depending on the column in the entity table that you want to join with.
166+
- `type`: Represents the [external ID type](/docs/unify/identity-resolution/externalids/#default-externalids) (`email`, `phone`, `user_id`) in your id-res settings. Depending on if you are using materialized or unmaterialized profiles, these correspond to different columns in your Profiles Sync warehouse tables:
167+
- [Materialized](/docs/unify/profiles-sync/tables/#the-user_identifiers-table) (Recommended): This corresponds to the `type` column in your Profiles Sync `user_identifiers` table.
168+
- [Unmaterialized](/docs/unify/profiles-sync/tables/#the-external_id_mapping_updates-table): This corresponds to the `external_id_type` column in your Profiles Sync `external_id_mapping_updates` table.
169+
- `join_key`: This is the column on the entity table that you are matching to the external identifier.
167170

168-
**Option 2:** Use the `traits` block to join with a profile trait on the entity table
169-
- `name`: The trait name that corresponds to a column name in your Profiles Sync `profile_traits_updates` table
170-
- `join_key`: This is the column on the entity table that you are matching to the trait
171+
**Option 2:** Use the `traits` block to join the profile entity with an entity table using [Profile Traits](/docs/unify/#enrich-profiles-with-traits).
172+
- `name`: Represents a trait name in your Unify profiles. Depending on if you are using materialized or unmaterialized profiles, these correspond to different columns in your Profiles Sync warehouse tables:
173+
- [Materialized](/docs/unify/profiles-sync/tables/#the-profile_traits-table) (Recommended): The trait name corresponds to a unique value of the `name` column in your Profiles Sync `user_traits` table.
174+
- [Unmaterialized](/docs/unify/profiles-sync/tables/#the-profile_traits_updates-table): This corresponds to a column in the Profile Sync `profile_trait_updates` table.
175+
- `join_key`: This is the column on the entity table that you are matching to the trait.
171176

172177
**Example:**
173178
```python

0 commit comments

Comments
 (0)