Relationships Between Data Extensions
You can define any relationship between Data Extensions provided there is a field that can be used to define that relationship. This is usually a unique identifier or email address, but any field you require can be used.
When building relationships between combined Data Extensions, always try to use your Primary Keys as the matching fields. Primary Keys act as optimized unique identifiers and using them as your Join condition improves the underlying SQL query's performance.
Create Relationships between Data Extensions
- Move a Data Extension on top of another on the Selection home page.
- The Create Relationship modal will pop up. Choose the field in the first Data Extension that matches the field in the second Data Extension. These are referred to as matching columns; typically, this will be an ID or Email address field. Here you can define as many additional relationships between two Data Extensions as you want by using the Add Relationship button.
- Use the dropdown in the middle to select how the Data Extensions should relate to each other. In Unaric Segment, these are referred to as matching types; in SQL, these are the JOINS.
For a list and overview of available matching types, see Matching Types.
There is no limit to how many relationships you create between two Data Extensions (JOINS). As for columns, your Target Data Extension can have the same number of columns as a standard SFMC Data Extension.
Exclusion and suppression lists
Exclusion and suppression lists are Data Extensions containing specific records, such as email addresses, that you want to exclude from your target audience. To apply them, you must set up a without matching relationship between your data sources.
- Drag your main source Data Extension into the Selected Data Sources section.
- Drag the Data Extension with the records you want to exclude on top of the previous Data Extension.
- Select the without relationship option in the modal and choose the field on which the Data Extensions relate.
For a detailed example, see 2. Exclude Contacts in a Data Extension from a campaign
Change existing relationships between selected data extensions
This feature is available in Unaric Segment Enable, Plus, and Advanced
Instead of deleting filters and relationships, you can redefine relationships.
This is handy in scenarios where, after joining two Data Extensions, you realize one of them had to be joined to another Data Extension instead, but have already used fields from the incorrect Data Extensions for filters or mapping in the Target Data Extension. To proceed, you would have to manually delete all those filters and field mappings, delete the relationship, recreate the new relationship, and then completely recreate all of those filters and mappings from scratch. As a workaround, you can redefine the relationship on your canvas:
- Click on the Data Extension you need to preserve (the dependent table) directly on your canvas and drag it on top of the new Data Extension you want to link (the new target table).
- A modal will pop up asking you to define the new relationship rules (the matching fields and matching type/JOIN) between them.
- Because you did not delete the relationship from the canvas, Unaric Segments keeps all your existing filters and target field mappings fully intact. The unnecessary relationship between the first two Data Extensions will be deleted and the fields mapped to your target Data Extension and used in your filters will be seamlessly rerouted through the new relationship path.