conflicts
Find and remove rows that contain the same values in a selected column.
This guide explains how to configure the conflicts instruction. To learn about another instruction, go back to the Available custom script instructions overview.
Introduction
Use the conflicts instruction to keep unique combinations for a given value. The instruction finds rows that share common values in a selected column but also contain non-identical values in at least one other column.
Creating a custom script enrichment using the conflicts instruction
To create and configure a custom script using the conflicts instruction, follow these steps:
-
In the Instructions step, select the conflicts instruction.
-
To configure the custom script instruction, fill in the following fields. Required fields are marked with an asterisk (*).
-
Key
-
Enter the name of the column to search through for duplicated values.
-
Include
-
Enter the names of the columns to include in the instruction. If populated, only the columns entered in the Include field are parsed.
-
Exclude
-
Enter the names of the columns to exclude from the instruction.
-
Presorted
-
Select this field if the table has been sorted. If a table is unsorted, the enrichment will take longer to complete.
-
Missing
-
Enter the values to be ignored as conflicts. By default, an empty field is treated as a missing value.
Example 1
In this example, the Campaign column is searched through for duplicated values. If duplicated values exist in the other columns of the table, the duplicated rows are removed.
Enrichment configuration
-
Key
-
Campaign
Data table before enrichment
Campaign |
Ad Group |
Clicks |
---|---|---|
Brand_1 |
media |
7 |
Brand_1 |
media |
7 |
Brand_1 |
media |
18 |
Dashboard_B |
media |
5 |
Dashboard_B |
media|social |
5 |
Brand_2 |
ecommerce |
49 |
Brand_2 |
ecommerce |
49 |
Brand_2 |
ecommerce |
13 |
Data table after enrichment
Campaign |
Ad Group |
Clicks |
---|---|---|
Brand_1 |
media |
7 |
Brand_1 |
media |
18 |
Dashboard_B |
media |
5 |
Dashboard_B |
media|social |
5 |
Brand_2 |
ecommerce |
49 |
Brand_2 |
ecommerce |
13 |
Example 2
In this example, the Clicks column is excluded from the enrichment. This means only the duplications in the Campaign and Ad Groups columns are searched through and removed.
Enrichment configuration
-
Key
-
Campaign
-
Exclude
-
Clicks
Data table before enrichment
Campaign |
Ad Group |
Clicks |
---|---|---|
Brand_1 |
media |
7 |
Brand_1 |
media |
7 |
Brand_1 |
media |
18 |
Dashboard_B |
media |
5 |
Dashboard_B |
media|social |
5 |
Brand_2 |
ecommerce |
49 |
Brand_2 |
ecommerce |
49 |
Brand_2 |
ecommerce |
13 |
Data table after enrichment
Campaign |
Ad Group |
Clicks |
---|---|---|
Dashboard_B |
media |
5 |
Dashboard_B |
media|social |
5 |