Generator catalog
Specify with {gen: <name>, ...params}. Names in parentheses are aliases.
Keys and numbers
| gen | params | notes |
|---|---|---|
sequence |
start=1, step=1 |
integer primary keys; FKs to a unit-step sequence cost O(1) memory |
int |
min, max, dist (uniform normal lognormal zipf poisson), mean, sigma, median, s, lambda |
rounded to integers |
float / decimal |
same, decimals |
default decimals follow the column scale |
money |
same, default dist: lognormal |
median (default 8% of the way from min to max), sigma=0.8, decimals=2 |
bool |
p=0.5 |
stored as 0/1 |
choice (enum) |
values: [a, b] or {a: 70, b: 30} |
weights are relative |
const |
value |
|
uuid |
version 4 from the column stream | |
regex (pattern, sku) |
pattern |
supports classes, ranges, groups, alternation, {m,n}, \d \w \s, backrefs; e.g. [A-Z]{3}-\d{5} |
expr |
expr, decimals |
SQL-style arithmetic over other columns of the row: quantity * unit_price |
json, blob |
size (blob) |
|
fk |
dist: uniform|zipf, s |
pick a parent key; zipf skews towards the first parents (popularity); unique FK columns draw a shuffled permutation |
Distributions: normal defaults to mean = midpoint and sigma = range/6; lognormal is heavy-tailed; zipf uses an inverse-CDF approximation, so any range size costs constant memory and time; poisson uses Knuth's method (normal approximation above lambda 40). Values outside [min, max] are re-drawn.
People and places
| gen | params | notes |
|---|---|---|
first_name, last_name, full_name |
country_col |
list follows the locale, or the row's country when country_col is given |
email |
from: [first_name, last_name], domains |
mark.smith@mail.example.com, 35% get a number; only RFC 2606 example.* domains by default |
username |
from |
|
phone |
country_col |
E.164: +1 NANP, +91 mobiles starting 6-9, +49 mobile prefixes |
country |
format: name|code, countries, home_weight=0.6 |
locale's country is favoured |
state |
country_col, format |
|
city |
country_col, state_col |
a city of that state (or country when no state column) |
postal_code |
country_col, state_col |
US 5 digits, India 6 digits, Germany 5 digits; leading digit follows the state |
street_address (address) |
country_col |
locale-specific shapes (753, Station Marg, Bahnhofallee 599) |
company, url, ip (version: 6) |
The embedded gazetteer covers US (10 states), IN (11) and DE (8), five cities each.
Text
| gen | params |
|---|---|
text (lorem, paragraph) |
min_words, max_words; truncated to the column's max length |
words, sentence |
min_words, max_words |
review |
one to three canned review sentences |
product_name, category_name |
adjective + noun / category list |
Dates
| gen | params |
|---|---|
date, datetime (timestamp), time |
min, max (default defaults.date_from/to), business_days: true, seasonality (a preset retail / summer / flat or {11: 2.0, 12: 2.6} month weights), weekday_weights (7 numbers, Monday first), time_profile: business|evening|uniform (datetime) |
after |
column (same row) or via (FK column) + column (parent's column); min, max as durations (90s, 15m, 2h, 30d, 2w), dist: uniform|exponential, seasonality |
after gives the correlated pairs: updated_at after created_at, end_date after start_date, a payment after its order (via: order_id). The output format (date or datetime) follows the base value.