This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
on 08-15-201605:40 PM - edited on 03-08-201901:12 PM by SydneyF
This article is part of the Tool Mastery Series, a compilation of Knowledge Base contributions to introduce diverse working examples for Designer Tools. Here we’ll delve into uses of the Unique Tool on our way to mastering the Alteryx Designer:
Unlike a snowflake, it is actually possible for duplicates exist when it comes to data. To distinguish whether or not a record in your data is unique or a duplicate we have an awesome tool called the Unique Tool that will actually turn your data into a unique snowflake.
The Unique Tool at its core is very simple to understand. In the configuration, you select which fields you want the records to be uniquely distinguished. If only one field is selected it will only look for the instance of unique records in that field particular field. If two or more fields are selected, the uniqueness of the data set will be distinguished by the combination of records. The U output will show a list of records that are unique depending upon the fields you selected, while the D output will give you the list of duplicates. It’s also helpful to know that the first record in each unique group is sent to the U output stream while the remaining records are sent to the Duplicate output stream.
For example, let’s say you have a dataset with two fields: First Name and Last Name. And you have two records: where one is John Smith and the other is John Johnson. If you selected just First Name in the configuration, Depending on which record came first you would have that record come into that U output stream while the other would come out of the D stream. If you selected both first name and last name both John Smith and John Johnson would appear in the unique output stream.
A good sample to reference and learn from is the sample provided within Alteryx itself. Right click on the Unique tool and click on “Open Example” to access this workflow.
Checking uniqueness before assigning primary keys to insert records into a database table with constraints
Obtaining the first instance of a unique records similar to a Summarize Tool "First" action. Because the order of the records matter, you can using this to your advantage to sort records in any way you desire before performing a unique to obtain the first record in any group of duplicates.
Now that you have seen what the Unique Tool is all about, you can finally journey on to discover all the duplicates hidden in your data. And remember:
By now, you should have expert-level proficiency with the Unique Tool! If you can think of a use case we left out, feel free to use the comments section below! Consider yourself a Tool Master already? Let us know at Community@alteryx.com if you’d like your creative tool uses to be featured in the Tool Mastery Series.”
Stay tuned with our latest posts every Tool Tuesday by following Alteryx on Twitter! If you want to master all the Designer tools, consider subscribing for email notifications.