Append
The Append Data Action adds new records to the existing ones in the Target Data Extension. If no Primary Key is specified, the new results are appended after the existing records, potentially leading to duplicates. However, when a Primary Key is defined, it's crucial to apply Prio Deduplication to avoid Error "Violation of PRIMARY KEY constraint. Cannot insert duplicate key".
Example
Assume the Target Data Extension contains the following data before running the Selection:
Customer ID | First Name | Last Name | Language | |
|---|---|---|---|---|
C-100 | Jane | Jones | English | |
C-101 | Kofi | Abimbola | Dutch | |
C-102 | Paul | Chang | Chinese | |
C-103 | Maria | Juarez | Spanish |
Sample Selection results:
stomer ID | First Name | Last Name | Language | |
|---|---|---|---|---|
C-102 | Paul | Chang | Chinese | |
C-104 | Marie | Benoit | French | |
C-112 | Bjorn | Svenson | Swedish | |
C-100 | Jane | Jones | English | |
C-102 | Paul | Chang | English |
If there’s no Primary Key (PK) set, after running the Selection, the updated Target Data Extension will contain the following data: the data in the Target Data Extension will contain the previously existing data (in Italics) with the new results added after the last record of the existing data. The order of the newly added records will be the same as how the resulting records were generated.
Customer ID | First Name | Last Name | Language | |
|---|---|---|---|---|
C-100 | Jane | Jones | English | |
C-101 | Kofi | Abimbola | Dutch | |
C-102 | Paul | Chang | Chinese | |
C-103 | Maria | Juarez | Spanish | |
C-102 | Paul | Chang | Chinese | |
C-104 | Marie | Benoit | French | |
C-112 | Bjorn | Svenson | Swedish | |
C-100 | Jane | Jones | English | |
C-102 | Paul | Chang | English |
If there's a Primary Key set, after running the Selection, the updated Target Data Extension will contain the following data (with PK Customer ID and Prio Deduplication): the Prio Deduplication is set on Customer ID as the unique value (as that’s the Primary Key) and the field deciding which one to keep is “Language = English”. The final data in the Target Data Extension will be in the order of the existing records (in Italics) with new ones added at the end.
In addition, if a duplicate record meets the Prio Deduplication criteria, it will be handled the same as existing and new records. In other words, if after Prio Dedup an existing record will be kept, then it will stay in its place in the final Target Data Extension result. If the de-duplicated record kept is new, it will be added to the end of the Target Data Extension so for example Paul Chang’s record with email [email protected] is new and added to the end of the Target Data Extension.
Customer ID [PK] | First Name | Last Name | Language | |
|---|---|---|---|---|
C-100 | Jane | Jones | English | |
C-101 | Kofi | Abimbola | Dutch | |
C-103 | Maria | Juarez | Spanish | |
C-104 | Marie | Benoit | French | |
C-112 | Bjorn | Svenson | Swedish | |
C-102 | Paul | Chang | English |