Remove - or / from date
Ah, sorry, you need to convert dates to strings first. So the following should work: upper(this.to_s) this.to_s.gsub(/[-]/,'') I need to improve that error message - it comes up even when the cause is...
View ArticleDuplicate Data from the builtin Hash function
My application generates a data field from a hash function, so the resulting data becomes a non-duplicative list. However, I want the data to reflect the case where some of the data is duplicated, as...
View ArticleDuplicate Data from the builtin Hash function
Yep, you've got the right idea... generate a set of data, duplicate some of the values, upload it as a dataset, then use the digest formula function to generate the hash values.
View ArticleFixed count of usernames either random or fixed list
First, mockaroo is a bucket of awesome, great job. Need to simulate work on a help desk. Need to randomly pick from a list of user names of 5 to 20 different values. Username is good for simulating...
View ArticleFixed count of usernames either random or fixed list
Yes, you can use the Custom List datatype to randomly pick values from a list. For larger lists you can use the Datasets feature which allows you to upload your own datasets as csv and randomly pull...
View ArticleHow do I apply the frequency column in a dataset to a schema?
Hi all I am trying to apply a frequency column in a schema to a particular field and can't work out how to do it. You can't select it as an option in the distribution type drop down. Is it applied...
View ArticleHow do I apply the frequency column in a dataset to a schema?
Never mind, just worked it out
View ArticleHow to set a column based on the value chosen from a dataset on another column
Assuming I have a column named project_media_type which is populated with a random value from this dataset: image animated_gif_player embedded_video embedded_iframe embedded_code_snippet image_gallery...
View ArticleHow to set a column based on the value chosen from a dataset on another column
Have you looked at the Formula data type? It allows you to specify custom logic and inter-column dependencies like this using ruby syntax.
View ArticleChange column data type based on value of another column possibble?
This if/else block below explains it better than I can with words.... if( 'project_media_type' === 'animated_gif'){ image_url = JSON data type with image_url.gif_url, image_url.cover_img_url }else{...
View ArticleHow to set a column based on the value chosen from a dataset on another column
I see now the Ruby part. I had seen the demo for formula but thought it just had the shown functions now I see it can use custom Ruby code too that will help. My next obstacle is figuring out if it is...
View ArticleHow to set a column based on the value chosen from a dataset on another column
In addition to the formula datatype, Mockaroo also allows you to alter the output of any column with a formula by clicking the f(x) button. Whatever is returned from that formula is the generated...
View ArticleVarious API access inquiries
I have been having an email conversation with someone from mockaroo. It was suggested that it might be best to continue on the forum, so I copied our messages thusfar in hereMe:is it possible to...
View ArticleVarious API access inquiries
Pasted image920x489 34.2 KB but that is just an example, this = Country(['The Republic of Dave', 'Petoria', 'Canada'])
View ArticleSQL create table types
I can't get my import from create table to spit out the right datatypes. How do you make it put in a varchar?
View ArticleVarious API access inquiries
If you just want to return a constant value, you could either use the formula data type with the value wrapped in quotes, or use the Template datatype.
View ArticleChange column data type based on value of another column possibble?
You could add the following inline formula to your image_url field: if project_media_type == 'animated_gif' { gif_url: this, cover_img_url: 'cover.gif' } else this end
View ArticleSQL create table types
Can share the create table SQL? Mockaroo should choose Custom List for all varchar fields. The library that Mockaroo uses specifically handles the postgres dialect. Your mileage may vary with other...
View ArticleVarious API access inquiries
I don't want a constant, that was just a bad example. this = Country(['The Republic of Dave', 'Petoria', 'Canada'])The general idea is that I want to be able to call one of your data type function in...
View Article