Is it possible to generate non-repeating random elements via mockaroo API?

I’m trying to generate a mock datasheet to feed my database. So far I’ve been able to implement many of the constraints I need this data to fit to. But when it comes to uniqueness on one of the columns (the one that’d be kind of the “primary key”) I cannot find an option not to generate duplicated records.

Is there any way to specify in my API calls that I don’t want a specific column to contain duplicated values (e.g. Countries)

Thanks in advance! :smiley:

There isn’t a way to do that at the moment. I am working on it, though. Is it country specifically that you wanted unique values for, or are there other fields as well?

Hey @mockaroo! thanks for your quick reply!

Yeah, that column is the only one I actually need uniqueness for. To be considered primary key in my table. :wink:

Hi, I have the same need described here… has there been any work towards this?

If I need a truly unique key-value database with an exact amount of numbers, I would just generate “enough” data , then run the database through a simple AWK script to filter out duplicates. And stop processing after needed number of lines.

Yes it’s an extra step, but with the new APIs it’s simple to do.

Just a suggestion.