Random Data Generator Repository

Generates data for databases
Post Reply
donose.mihai
Posts: 470
Joined: Thu Apr 07, 2011 11:05 am

Random Data Generator Repository

Post by donose.mihai » Mon Sep 23, 2013 4:53 am

GENERATOR REPOSITORY

TEXT
One Letter
Pattern: [a-z]{1}
Will generate a single character from a to z.
Sample: a,b,c,d,e…z


Two letters
Pattern: [a-z]{2}
Will generate two characters from a to z.
Sample: aa,bb,ca,dt…etc
By modifying the value in the brackets it will modify the number of characters generated, for example if we had a pattern like [a-z]{5} it will generate 5 random characters like agbts, hgftp etc…


Short Text
Pattern: ((I|John|Cindy) (met|knows|is visiting|called) (Rolph|Tony|Adrian|Florian|Mike|Poe). )
In this case a random three word will be generated taking a value from each parenthesis.
Sample: I met Tony, John Called Mike…


Medium Text
Pattern: ((I|Mike|Rudi) (loves flowers|like sports|like swimming|watches football). ){1,2}
By appending or modifying the value in the brackets {1.2}, another sentence will be generated after the first one.
Sample: Rudi loves flowers. I l like sports.

Numbers

Sequence
Pattern: sequence:from=0;step=1;
Generates number starting at 'from' and increasing with 'step'.
Sample: 0,1,2,3…
If you will modify the from and step value like this: from=1;step2 the generated numbers will be 1,3,5….

Random Numbers:
Pattern: int:from=0;to=999999999;
Generates number random between 0 and 999999999.
Sample: 192734598, 712628594…


Random Float Numbers:
Patter: int:from=0;to=5;format=#.##
You can notice that the pattern is like for the number only we’ve added the ;format=#.## to the pattern, Will generate random doubles with two digits after the decimal point :
Sample: 0.53, 0.12....

5 Digit Ids
Pattern: [0-9]{5}
Will generate 5 digit numbers between 0 and 9.Modifying the value between the brackets will modify the number of digits generated.
Sample: 01257, 91234…

DATE

Date
Pattern: date:from='01.01.2012';to='01.01.2013';
Will generate a random date from 01.01.2012 to 01.01.2013.
Sample: 2013.01.01, 2012.05.06…

Timestamp
Pattern: timestamp:from='01.01.2012 00:00:00 000';to='01.01.2013 00:00:00 000';
Will generate a random date and a random timestamp between the selected dates.
Sample: 2012.04.05 09:38:37 312, 2012.08.09 10:11:52 968….

Year
Pattern: (2008|2009|2010|2011|2012)
Will generate a random year from the above pattern
Sample: 2009,2012,2008…

Personal

Color
Pattern: list:file=color.txt
This is a predefine list and it can not be change.
Sample: Aqua,Yellow,Blue….

Contact Title
Pattern: ((Corporate |Technical |National |International |Business |Consumer |Accessory)(Sales|Marketing|Customer)|Technical|Accounting|Service|Prepaid Customer|Web)
Will generate a random title from the above pattern.
Sample: Accounting, Sales, Prepaid Customer…

Email (Internet Safe)
Pattern: [a-z]{4,8}([0-9]{0,3}|.[a-z]{4,10})@example.com
Will generate a random email with character and numbers.
Sample: otpx@example.com, lmvg82@example.com

Email
Pattern: [a-z]{4,8}([0-9]{0,3}|.[a-z]{4,10})@([a-z]{4,9}.)?([a-z-]{6}).(org|com|net)
Just like the internet safe email it will generate an email with a random domain and with the .org .com or .net extensions.
Sample: duju1@yyt.com, vseqq@oxv.com
Extensions
Pattern: [0-9]{1,3}
Will generate a random number between 0 and 9 repeating from between 1 and 3 times.
Sample: 5,951,23…

First Name
Pattern: list:file=NamesFirst.txt
This is a predefine list and it can not be change.
Sample: Marty, Shelly, Dina…

First Name Female
Pattern: list:file=NamesFirstFemale.txt
This is a predefine list and it can not be change.
Sample: Donna, Candy, Jennifer
First Name Male
Pattern: list:file=NamesFirstMale.txt
This is a predefine list and it can not be change.
Sample: Raymond, Danny, Josef…

Last Name
Pattern: list:file=NamesLast.txt
This is a predefine list and it can not be change.
Sample: Hill, Summers, Woodard

Full Names
Pattern: ($First Name) ($Last Name)
It will take the First Name and the Last Name from the predefined lists.
Sample: Troy Hubber, Candy Summers…

Nickname
Pattern: ($First Name)[0-9]{0,3}
It will generate the First Name based on the predefined list and add a number from 0 to 9 , 0 or 3 times.
Sample: Johnny9, Danny752…

Name(Suffix)
Pattern: (Sr.|jr.|III|IV|V|A.B.|BA|B.A.|BSc|B.S.|M.A.|M.B.A.|MBA.|M.Sc.|Ph.D.|D.Phil.|D.D.|M.D.|J.D.)
It will pick a random suffix from the above list.
Sample: Sr., Ph.D, D.D
Working Age
Pattern: random:from=0;to=50;
Will generate a random number between 0 and 50.
Sample: 20,5,49…

Phone Number(Short)
Pattern: [0-9]{3}(-)[0-9]{3}(-)[0-9]{4}
Will generate a phone number based on the above pattern.
Sample: 489-255-1387,224-910-7631…

Phone Number
Pattern: ((\([0-9]{3}\) )|([0-9]{3}-))[0-9]{3}-[0-9]{4}
Will generate a phone number based on the above pattern.
Sample: 856-042-8811, (503) 246-0886…

Title
Pattern: Mr|((Mrs|Miss|Ms)|Dr)(.?)
Will generate a random title from the above pattern
Sample: Mr. Dr. …
Social Security Number
Pattern: [0-9]{3}-[0-9]{2}-[0-9]{4}
Will generate a number based on the pattern.
Sample: 551-25-8741,136-55-710…





LOCATION

Address Line
Pattern: ([1-9][0-9][0-9]?) (North |East |West |South )(Green |White |Rocky )(Nobel|Fabien|Hague|Oak|Second|First|Cowley|Clarendon|New|Old|Milton) (Way|Street|St.|Avenue|Road|Parkway|Freeway|Drive|Boulevard|Blvd.)
Will generate a random address.
Sample: 52 South Green Milton Road, 402 East Rocky Second Drive…

Address Line 1
Pattern: ((APT|Appartment) [1-9][0-9]{0,2})|(Suite [1-9][0-9]{0,3})|((1st|2nd|3rd|[4-9]th|[1-9]{2,3}th) Floor)|((Sales|Customer|After Sales|Pre Sales|Post Sales) (Group|Department))|((Lincoln|Washington|Jefferson|Roosevelt|Hamilton|Franklin|Marshall|Edison|Wilson|Madison|Roosevelt|Truman|Einstein|Anthony|Sanger|Foster) Building)
Sample: 26 4th Floor, Lincoln Building, 2nd Floor
Building Units
Pattern: (Apartment|Basement|Building|Department|Floor|Front|Hangar|Lobby|Lot|Lower|Office|Penthouse|Pier|Rear|Room|Side|Slip|Space|Stop|Suite|Trailer|Unit|Upper)

Sample: Unit, Rear, Basement

Country
Pattern: list:file=Country.txt
This is a predefine list and it can not be change.
Sample: Nigeria, United States, Russia…

Country Code
Pattern: list:file=CountryCode.txt
This is a predefine list and it can not be change.
Sample: KEN, DOM, SRB…


Country Code (short)
Pattern: list:file=CountryCode2.txt
This is a predefine list and it can not be change.
Sample: SB, JP, CX…




US State
Pattern: list:file=State.txt
This is a predefine list and it can not be change.
Sample: Utah, Montana…

US State Code
Pattern: list:file=StateCode.txt
This is a predefine list and it can not be change.
Sample: CO, KS, UT…

US City
Pattern: list:file=USCity.txt
This is a predefine list and it can not be change.
Sample: Mesa, El Paso…

Zip Code
Pattern: [0-9]{5}
Will generate a random 5 digit number between 0 and 9.
Sample: 10574, 26548…

Zip Code Plus 4
Pattern: [0-9]{5}-[0-9]{4}
Will generate a random 5 digit number between 0 and 0 followed by another 4 digit number between 0 and 9.
Sample: 20135-4123, 32710-7120…

P.O BOX
Pattern: ((P.O.)|(PO)) Box [1-9][0-9]{0,4}
Will pick a value between P.O. Box and PO Box and will generate a number between 0 and 9, between 0 and 4 times.
Sample: PO BOX 6, P.O. Box 524…

Region
Pattern: (AL|AK|AZ|AR|CA|CO|CT|DE|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY)-[A-Z]{2}

Sample: AL,ND,LA-PI



COMPUTER

File Extension
Pattern: (bmp|jpg|gif|doc|xls|ppt|txt|ini|php|asm|pdf|aspx|html|xml)
Will pick a value from the above pattern.
Sample: gif,txt,xml…

File Name
Pattern: [a-z]{3,10}.(bmp|doc|xls|txt|ini|php|asm|pdf)
Will generate some characters between a and z 3 to 10 times with one of the extensions above.
Sample: abf.doc, movr.bmp, rwb.pdf…

Folder (Dos)
Pattern: [A-Z]:\\(Windows|Win|Program|Program Files|Document and Settings|Inetpub)\\((Temp|Red Gate|Business|Sales|Test|Products|Builds|SQL Compare|SQL Data Compare|SQL Refactor|SQL Prompt|SQL Data pattern)\\){1,5}[a-z]{3,5}.(bmp|doc|xls|txt|ini|php|asm|pdf)

Sample: G:\Windows\Temp\Test\qjt.xls, W:\Inetpub\Sales\pzr.ini…

Folder (Web)
Pattern: http://[a-z]{3,5}.(web|net|local)[a-z]{0,1}[0-9]{0,2}/([a-z]{5}/){1,4}[a-z]{3,5}.(bmp|doc|xls|txt|ini|php|asm|pdf)

Department
Pattern: ((Corporate|Technical|National|International|Business|Consumer|Accessory)Sales|Technical|Marketing|Accounting|Cutomer|Service|Prepaid Customer|Corporate Care|Web)

Sample: Service, Web, Technical…

Source of leads
Pattern: (Sales|Internet|Direct|Add. Words|Previous Customer|Google Adds|Word of mouth)

Sample: Google Adds, Word of mouth…



URL Web
Pattern: http://[a-z]{3,5}.(web|net|local)[a-z]{0,1}[0-9]{0,2}/([a-z]{5}/){1,4}[a-z]{3,5}.(html|htm|php|aspx)

INDUSTRY
Product Name
Pattern: (Re|Ad|Par|Tru|Thru|In|Bar|Cip|Dop|End|Em|Fro|Gro|Hap|Kli|Lom|Mon|Qwi|Rap|Sup|Sur|Tip|Tup|Un|Up|Var|Win|Zee)(ban|cad|dud|dim|er|frop|glib|hup|jub|kil|mun|nip|peb|pick|quest|rob|sap|sip|tan|tin|tum|ven|wer|werp|zap)(il|ic|im|in|up|ad|ack|am|on|ep|ed|ef|eg|aqu|ef|edg|op|oll|omm|ew|an|ex|pl)?(icator|or|ar|ax|an|ex|istor|entor|antor|in|over|ower|azz)

Sample: Emglibar, Hapvenover…

Sector
Pattern: list:file=businessSectors.txt
This is a predefine list and it can not be change.
Sample: Power, Marine, Financial Services…

Category
Pattern: (Dairy|Beverages|Confections|Seafood|Meat|Poultry|Grain|Cereals|Produce|Shell fish|Snails)

Sample: Meat, Grain, fish…

Company Name
Pattern: (Re|Ad|Par|Tru|Thru|In|Bar|Cip|Dop|End|Em|Fro|Gro|Hap|Kli|Lom|Mon|Qwi|Rap|Sup|Sur|Tip|Tup|Un|Up|Var|Win|Zee)(ban|cad|dud|dim|er|frop|glib|hup|jub|kil|mun|nip|peb|pick|quest|rob|sap|sip|tan|tin|tum|ven|wer|werp|zap)(il|ic|im|in|up|ad|ack|am|on|ep|ed|ef|eg|aqu|ef|edg|op|oll|omm|ew|an|ex|pl)?(icator|or|ar|ax|an|ex|istor|entor|antor|in|over|ower|azz)(([ -]?Pro|Duplex|Multi){0}) (Direct|WorldWide|Holdings|International) (Inc|Company|Group|Corp.)?

Sample: Tupmunplor Holdings, Winnipupentor Direct Corp…




MONEY

Credit Card Date
Pattern: (01|02|03|04|05|06|07|08|09|10|11|12)/([01][0-9])

Sample: 02/04, 05/08…

Credit Card Issue Number
Pattern: [1-9]

Sample: 1,6,7….

Credit Card Type
Pattern: AmEx|Mastercard|VISA

Sample: VISA, Mastercard, AmEx…

Currency Name
Pattern: Australian dollar|Swiss franc|Euro|Pound sterling|Yen|US dollar

Sample: Euro, Yen, US dollar…

Currency Code
Pattern: list:file=Currency.txt
Sample: USD, SKK, EUR…

austingrd
Posts: 50
Joined: Sat Aug 24, 2013 3:03 pm

Re: Random Data Generator Repository

Post by austingrd » Sat Oct 19, 2013 4:09 pm

Very well written. I was able to follow this guide on a repository and it worked well for me.

cjd
Posts: 5
Joined: Sat Feb 14, 2015 10:20 am
Location: Lichfield, UK

Re: Random Data Generator Repository

Post by cjd » Sat Feb 14, 2015 10:28 am

Can we further customize the random data generator pattern?
e.g generate random nvarchar (6) only for one column in a table
or
e.g specify only present and future dates, not in the past?

donose.mihai
Posts: 470
Joined: Thu Apr 07, 2011 11:05 am

Re: Random Data Generator Repository

Post by donose.mihai » Wed Feb 25, 2015 6:30 pm

Yes, all can be customized.

Go to Random data generator -> Double click on the table name -> and you got the Edit column.

Regards,

Mihai
Attachments
2015-02-25_203021.png
2015-02-25_203021.png (25.7 KiB) Viewed 15987 times

Mariabade
Posts: 1
Joined: Sun Feb 26, 2017 1:55 pm

Random Data Generator Repository

Post by Mariabade » Thu Jan 25, 2018 9:04 pm

I have added this hack but the profile image is not showing up for anyone.
It says this where the profile image is supose to be Random Member Profile Image
Ночная Москва похожа на проститутку – она себя продаёт, причём продаёт выгодно и не дёшево…

Post Reply