Unique Tool
One Tool Example
Unique has a One Tool Example. Visit Sample Workflows to learn how to access this and many other examples directly in Alteryx Designer.
Use Unique to distinguish whether a data record is unique or a duplicate by grouping on one or more specified fields, then sorting on those fields.
Configure the Tool
Column Names: Select the columns where you want to find unique values.
Use the Select All button to compare entire records. The data is sorted based on the Unique columns. Therefore if you want a specific sort order, use the Sort tool to assign the specific sort order of the file prior to using the Unique tool. For best results, uncheck the Use Dictionary Order setting in the Sort tool configuration and sort on all the fields selected in the Unique tool before you sort on additional fields.
Use Deselect All to deselect all fields.
Output Anchors
The Unique tool has 2 output anchors:
U anchor: Contains the unique records from the dataset. The first record of each group is shown.
D anchor: Contains the duplicate records from the dataset. The remaining records from each group are shown.
Note that manual inspection of the results is often necessary to ensure that rows flagged as duplicates are actually duplicates. For example, you might have 2 customers that share the same name but live at different addresses. If you think that your dataset might include these types of outliers, you might want to select additional columns when you configure this tool.
Output Example
Let's take a look at an example of the Unique tool output based on this sample dataset.
Input Data Stream
In the Unique tool Configuration window, we select both the FirstName and LastName columns from our incoming data stream to make sure that we don't include duplicate entries of the same FirstName-LastName combination.
FirstName | LastName |
---|---|
Pamela | Wright |
Melissa | Ruff |
Constanti | Vlassis |
Amy | Lockemer |
Danielle | Valdez |
Pamela | Wright |
Mary | Kiniry |
Melissa | Ruff |
Danielle | Valdez |
U Anchor Output
The U output anchor returns all unique rows from the above incoming data stream.
FirstName | LastName |
---|---|
Amy | Lockemer |
Constanti | Vlassis |
Danielle | Valdez |
Mary | Kiniry |
Melissa | Ruff |
Pamela | Wright |
D Anchor Output
The D output anchor returns any duplicate rows from the above incoming data stream.
FirstName | LastName |
---|---|
Danielle | Valdez |
Melissa | Ruff |
Pamela | Wright |