Combine Data Extensions without Matching Columns
This feature is available on Unaric Segment Plus and Advanced.
This page demonstrates how to use Row Number Custom Value to generate sequential numbers for records in different Data Extensions. By creating a Row Number column in two unrelated Data Extensions, you establish a common field that allows you to successfully combine them. In this way, you can combine Data Extensions that do not have any matching columns.
For example, how can the user combine Customers and Vouchers Data Extensions to randomly match one voucher to a customer?
Id | First Name | Last Name | |
|---|---|---|---|
C-001 | Anna | Smith | |
C-002 | John | Doe | |
C-003 | Lorra | Lee |
Voucher Code | Promotion Name | Discount Percentage |
|---|---|---|
MSS-VOUCHER-001 | Mid Season Sale | 10 |
MSS-VOUCHER-002 | Mid Season Sale | 10 |
MSS-VOUCHER-003 | Mid Season Sale | 10 |
Setup
Input
- On the Home page, click New to create a new selection.
- Drag the Customers Data Extension to the Selected Data Extensions section.
Output
- Click the Create Data Extension button, enter a name, e.g. Customers with Row Number, and press Save.
- Add all the fields from Customers Data Extension by clicking the Add all fields button.
- Under Custom Values, click Add new value.
- Under Name, enter: Row Number and hit Next.
- Choose Type: Apply formula to a field.
- Choose Type: Row Number.
- On the first drop-down list with the label Data Extension, choose Customers.
- On the second drop-down list with the label Field, choose ID.
- On the third drop-down list with the label Order, choose Ascending and hit Save.
- Add the Row Number field to the Target Data Extension fields.
- Hit Save Data Extension and Create.
Preview
When the user clicks Run Preview on the Preview screen, the Customer with Row Number Data Extension should look like this.
Id | First Name | Last Name | Row Number | |
|---|---|---|---|---|
C-001 | Anna | Smith | 1 | |
C-002 | John | Doe | 2 | |
C-003 | Lorra | Lee | 3 |
The user can now click on the Run button to run the selection.
Repeat
Repeat the steps accordingly for Vouchers Data Extension. In the end, the Target Data Extension should look like this.
Voucher Code | Promotion Name | Discount Percentage | Row Number |
|---|---|---|---|
MSS-VOUCHER-001 | Mid Season Sale | 10 | 1 |
MSS-VOUCHER-002 | Mid Season Sale | 10 | 2 |
MSS-VOUCHER-003 | Mid Season Sale | 10 | 3 |
Now, the user can combine the Customers and Vouchers Data Extension using the Row Number column.