Is it possible to create fields which are not included in the output?
Yes! Just start your field name with two underscore "_" characters (e.g "__myHiddenField") and it will omitted from the output. This is useful when creating intermediary fields for use in formulas and templates. For example:
How can I tie the value of one field to another?
There are several ways to do this:
- Upload your own datasets to ensure integrity across multiple fields.
- Use Scenarios to shape numeric values based on other fields in your schema.
- Use the Formula data type to generate values based on other fields.
- Formulas can also be use to implement simple if/else logic.
- Use the Template data type to concatenate multiple string fields.
How can I generate data for specific keys in my database or other datasets I've downloaded from Mockaroo?
Upload your key values as a dataset. Then, include key fields in your schemas using the dataset Column type. If you need to include related non-key values when generating data data, include those fields in your datasets as well.
How can I generate start and end dates that are randomly spaced apart where the end date always comes after the start date?
Use the date type for start_date and the formula type for end_date with a value like
start_date + days(random(1,5))to generate an end date between 1 and 5 days after the start date.
Will various geographic fields such as city, country, and postal code generate real locations?
Yes, each of the following groups of fields are correlated:
- State Abbrev
- Postal Code
- Currency Name
- Currency Code
- FDA NDC Code
- Drug Name (Brand)
- Drug Name (Generic)
- Drug Company
- ICD9 Diagnosis Code
- ICD9 Dx Desc (Long)
- ICD9 Dx Desc (Short)
- ICD9 Proc Desc (Long)
- ICD9 Proc Desc (Short)
- ICD9 Procedure Code
- File Name
- Mime Type
- First Name
- Last Name
I specified 50% blank for a field, but when I downloaded 10 records, more/less than 5 of them were blank. What gives?
Mockaroo generates data randomly, so the number of blanks should be close to your target percentage, but will be slightly different each time you generate data. We find that random data makes for better testing and more realistic demos.
What happened to lists?
In January of 2015 lists became datasets. Datasets are essentially lists that can have multiple columns. This change was made to allow users to tie multiple fields together to enforce data integrity. In addition, the weighted lists feature has changed. See the question below for more info.
I was using weighted lists to control the distribution of categorical data. The weighted lists feature is no longer available. Am I able to do the same using datasets?
Yes! When using weighted lists, each list column had to be uploaded as a separate file, and repeated in dependent lists. Now you can upload all related columns in a single dataset and use the frequency column as before to control the distribution of data. The one significant change is that wildcards are no longer supported, so if a value is valid for multiple cases, each case must be explicitly enumerated in the dataset. Click here for an example.