|
| 1 | +--- |
| 2 | +title:Linked Events |
| 3 | +beta:true |
| 4 | +plan:unify |
| 5 | +--- |
| 6 | + |
| 7 | +>info "Linked Events is in private beta" |
| 8 | +>Linked Events is in private beta, and Segment is actively working on this feature. Some functionality may change before it becomes generally available.[Contact Segment](https://segment.com/help/contact/){:target="_blank"} with any feedback or questions. |
| 9 | +
|
| 10 | + |
| 11 | +Use Linked Events to enrich real-time event streams with entities from your data warehouse to your destinations. Insert additional event context for downstream applications for richer data about each event. |
| 12 | + |
| 13 | +On this page, you'll learn how to get started with Linked Events. |
| 14 | + |
| 15 | +##Use cases |
| 16 | + |
| 17 | +With Linked Events, you can: |
| 18 | + |
| 19 | +-**Add details to events for precise targeting**. Enable targeting by appending product events that only have`product_id` with full product SKU details from your warehouse. |
| 20 | +-**Sync enriched data**. Add a loyalty ID to event payloads before sending it downstream to destinations such as Amplitude, Mixpanel, and more. |
| 21 | +-**Reduce load times**. Enrich page view events with products and subscriptions connected to that view, and send that to Google Analytics 4 to lighten the front end and reduce page loading time. |
| 22 | + |
| 23 | +##Requirements |
| 24 | + |
| 25 | +Before getting started with Linked Events, you'll need: |
| 26 | + |
| 27 | +1.[BigQuery](/docs/unify/linked-profiles/setup-guides/bigquery-setup/),[Snowflake](/docs/unify/linked-profiles/setup-guides/snowflake-setup/), or[Redshift](/docs/unify/linked-profiles/setup-guides/redshift-setup/) data warehouse credentials with**write** access. |
| 28 | +2. Access to Unify in your workspace. |
| 29 | +3. Access to the Destination you'll be using with Linked Events so that you can validate your data. |
| 30 | + |
| 31 | +>info "" |
| 32 | +>Segment stores and processes all data in the United States. |
| 33 | +
|
| 34 | +###Linked Events roles |
| 35 | + |
| 36 | +The following Segment access[roles](/docs/segment-app/iam/roles/) apply to Linked Events: |
| 37 | + |
| 38 | +**Entities Admin Access**: Full CRUD (create, read, access, and delete) access to all Entities within a workspace. You can also grant or revoke user permissions. |
| 39 | + |
| 40 | +**Entities Read-only Access**: Read-only access to all Entities models and destinations in a workspace. |
| 41 | + |
| 42 | +For Linked Events, you need the following roles: |
| 43 | +-`Workspace Owner` |
| 44 | +-`Entities Admin` |
| 45 | +-`Source Admin` |
| 46 | + |
| 47 | +To use Connections with Linked Events: |
| 48 | +-`Workspace Owner` |
| 49 | +-`Unify Read-only or Admin` |
| 50 | +-`Entities Admin` |
| 51 | +-`Source Admin` |
| 52 | + |
| 53 | +##Step 1: Connect a data warehouse |
| 54 | + |
| 55 | +>info "" |
| 56 | +>Linked Events uses Segment's[Reverse ETL](/docs/connections/reverse-etl/) infrastructure for pulling in data from your warehouse. |
| 57 | +
|
| 58 | +To get started, you'll need to connect a data warehouse. Linked Events supports[BigQuery](/docs/unify/linked-profiles/setup-guides/bigquery/),[Snowflake](/docs/unify/linked-profiles/setup-guides/snowflake/), and[Redshift](/docs/unify/linked-profiles/setup-guides/redshift-setup/). |
| 59 | + |
| 60 | +1. Navigate to**Unify > Data graph** and click**Add warehouse**. |
| 61 | +2. Select a warehouse to connect from the[supported data warehouses](#supported-data-warehouses). |
| 62 | +3.[Connect your warehouse](#connect-your-warehouse). |
| 63 | +3. Click**Test Connection** to be sure your warehouse is connected. |
| 64 | +4. After a successful test, click**Save**. |
| 65 | + |
| 66 | +###Schema |
| 67 | + |
| 68 | +For Linked Events, the sync destination is an internal Segment data store. To track the data you send to Segment, you can view deltas/diffs in tables within a single schema Segment creates called`_segment_reverse_etl`. |
| 69 | + |
| 70 | +You can choose which database within your warehouse this data lives in. |
| 71 | + |
| 72 | +>info "" |
| 73 | +>Linked Events syncs data from your warehouse approximately once every hour. |
| 74 | +
|
| 75 | +###Supported data warehouses |
| 76 | + |
| 77 | +The table below shows the data warehouses Linked Events supports. View the Segment docs for your warehouse, then carry out the corresponding steps. |
| 78 | + |
| 79 | +| Data Warehouse| Steps| |
| 80 | +|------------------------|-------------------------| |
| 81 | +|[Snowflake](docs/unify/linked-profiles/setup-guides/snowflake-setup/)| 1. Configure your snowflake database. <br> 2. Enter your credentials. <br> 3. Test the Connection. <br> 4. Click**Save**.| |
| 82 | +|[BigQuery](/docs/unify/linked-profiles/setup-guides/bigquery-setup/)| 1. Add your credentials to the database that has tables with the entities you want to enrich your event with. <br> 2. Test your connection.| |
| 83 | +|[Redshift](/docs/unify/linked-profiles/setup-guides/redshift-setup/)| 1. Select the Redshift cluster you want to connect. <br> 2.[Configure](/docs/connections/storage/catalog/redshift/#networking) the correct network and security settings.| |
| 84 | + |
| 85 | +##Step 2: Add entities |
| 86 | + |
| 87 | +After you connect your warehouse, use the Data graph overview page (**Unify > Data graph**) to view entities Segment has synced from your data warehouse, add a new entity, and view data warehouse settings. |
| 88 | + |
| 89 | +To add a new entity: |
| 90 | +1. Click**Add entity**. |
| 91 | +2. Select the table(s) from your warehouse that you'll use as an entity. |
| 92 | +3. For each table you select, choose a primary key from the drop-down menu. |
| 93 | +- The primary key uniquely identifies rows in your table. |
| 94 | +4. Click**Add entities**. |
| 95 | + |
| 96 | +>success "" |
| 97 | +>If you don't see data you need, or have recently updated your warehouse, click**Refresh** to update the schema and tables list. |
| 98 | +
|
| 99 | + |
| 100 | +##Step 3: Add a Destination |
| 101 | + |
| 102 | +To use Linked Events, you'll need to add a destination to send enriched events to. Navigate to**Connections > Destinations**. Select an existing destination, or click**+ Add destination** to add a new destination. |
| 103 | + |
| 104 | +>info "" |
| 105 | +>For Linked Events, Segment supports[Destination Actions](/docs/connections/destinations/actions/). |
| 106 | +
|
| 107 | + |
| 108 | +##Step 4: Enrich events with entities |
| 109 | +With Linked Events, you can select entities and properties from your data warehouse, then add enrichments to map properties to your connected destination. |
| 110 | + |
| 111 | +To enrich events with entities: |
| 112 | + |
| 113 | +1. Navigate to**Connections > Destinations > Event streams** |
| 114 | +2. Select the destination you'd like to create an enrichment on. |
| 115 | +3. From the Destination overview page, click**Mappings**. |
| 116 | +4. Click**New Mapping**, and select the type of mapping you'd like to add. |
| 117 | +- Click the**...** icon to edit an existing mapping. |
| 118 | +5. In the "Select Events to Map and Send", define the[conditions](/docs/connections/destinations/actions/#conditions) under which the action should run. |
| 119 | +6. Click**Load Sample Event**, then add your entities. |
| 120 | + |
| 121 | +###Add entities |
| 122 | + |
| 123 | +After you load a sample event, you can add entities from the**Enrich events with entities** section. You’ll select an entity, then an entity match property. |
| 124 | +- The entity match property is the property in the event that you want to match to the primary key. |
| 125 | + |
| 126 | +After you’ve added an entity and match property, add your event enrichments. |
| 127 | + |
| 128 | +###Add enrichments |
| 129 | + |
| 130 | +Use enrichments to select the entity you wish to send to your downstream destination. |
| 131 | + |
| 132 | +In the Mappings tab, locate the**Select Mappings** section where you can enrich source properties from the entities you've selected in the previous step. |
| 133 | + |
| 134 | +1. Select the propery field that you'd like to enrich, then select the**Enrichments** tab. |
| 135 | +2. Select the entity you want to send to your destination. |
| 136 | +- You’ll have access to all rows/columns in your data warehouse associated with the property you've selected in the previous step. |
| 137 | +3. Add the key name on the right side, which is what Segment sends to your destination. |
| 138 | + |
| 139 | +>warning "" |
| 140 | +>At this time, Linked Events doesn't support a preview of enriched payloads. |
| 141 | +
|
| 142 | +###Test and save your Enrichments |
| 143 | + |
| 144 | +After you’ve added Enrichments, test and save your enrichments. |
| 145 | + |
| 146 | +1. Test the mapping with data from a sample event. |
| 147 | +- The edit panel shows you the mapping output in the format for the destination tool. You can change your mapping as needed and re-test. |
| 148 | +2. When you're satisfied with the mapping, click**Save**. Segment returns you to the Mappings table. |
| 149 | + |
| 150 | +>warning "" |
| 151 | +>At this time, when you select mappings or test events, you won’t see enrichment data. Enrichment data is only available with real events. |
| 152 | +
|
| 153 | +##Frequently asked questions |
| 154 | + |
| 155 | +####What data warehouse permissions does Segment require? |
| 156 | + |
| 157 | +To use Linked Events, be sure that you have proper permissions for the Data Warehouse you're using. Visit the[BigQuery](/docs/unify/linked-profiles/setup-guides/bigquery-setup/),[Snowflake](/docs/unify/linked-profiles/setup-guides/snowflake-setup/), and[Redshift](/docs/unify/linked-profiles/setup-guides/redshift-setup/) setup guides to learn more about updating permissions. |
| 158 | + |
| 159 | +####How often do syncs occur? |
| 160 | + |
| 161 | +Segment currently syncs once every hour. |
| 162 | + |
| 163 | +####Which Action Destinations does Linked Events support? |
| 164 | + |
| 165 | +For Linked Events, Segment supports all Actions Destinations. |
| 166 | + |
| 167 | +####Why aren't test events working? |
| 168 | + |
| 169 | +Test events don't send Linked Events. You'll only see test events that come from the source debugger, which is ahead of the event enrichment. |
| 170 | + |
| 171 | + ####Can I view my Linked Events Audit Trail? |
| 172 | + |
| 173 | +Linked Events uses the existing Audit Trail in your Segment workspace. To view your Audit Trail, navigate to**Settings > Admin > Audit Trail**. |
| 174 | + |
| 175 | +####How can I refresh linked data from my warehouse? |
| 176 | + |
| 177 | +You can define a schedule for refreshing the linked data from your data warehouse. |
| 178 | + |
| 179 | + |
| 180 | + |
| 181 | + |