Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to generate unique random value?

i want generate unique random value
so i used tRowgenerator and numeric.random()
but i dont get unique value  how to generate unique random value(integer value)?
Labels (2)
2 Replies
Luiz_Filipe
Contributor
Contributor

Hello, have you checked if tAddCRCRow works for you? The tAddCRCRow "calculates a surrogate key based on one or several columns and adds it to the defined schema.
Anonymous
Not applicable
Author

What type of random unique value do you need? If it is a number, is there any reason why a sequence would not work? A sequence would produce unique values, although not random.
If it is a random alphanumeric value you need, why not use  java.util.UUID? You can see how to use this here ( http://docs.oracle.com/javase/6/docs/api/java/util/UUID.html).