I'm trying to create a query in Data Preparation of SAS VIYA 8.2 and I want to distinct or make a unique records of my column. But unfortunately I can't find a tick box or built in transformation. Unlike SAS VA Data Builder it has an option on the target table to make the records unique.
Below are the only transformation I can find on the options.
Do someone knows where can I find this option on VIYA?
Currently, there is not a built-in transform to create a UniqueID; however, you can achieve this by adding custom code using the Code Transform. Here is a screen shot of an example below.
The variable _THREADID_ returns the number that is associated with the thread that the DATA step is running in a server session. The variable _N_ is an internal system variable that counts the iterations of the DATA step as it automatically loops through the rows of an input data set. The _N_ variable is initially set to 1 and increments by 1 each time the DATA step loops past the DATA statement. The DATA step loops past the DATA statement for every row that it encounters in the input data. Because the DATA step is a built-in loop that iterates through each row in a table, the _N_ variable can be used as a counter variable.
Both of these are variables that are created automatically by the SAS DATA step and saved in memory. For more information on automatic DATA step variables refer to its help topic:
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.