Choosing a generator for a column
This page is a quick decision aid for the propose command: “my column looks
like this – which generator should I expect, and why?” For the full list of
generator functions and proposers, and how propose scores and ranks them,
see Built-in generators and proposers.
Start here
In almost all cases, just run propose on the column and take the
Recommended generator – it already scores every applicable candidate on
fidelity, novelty and diversity against your real data, which is more
reliable than guessing from the column’s type alone. The table below is for
the two situations where you need more than the recommendation:
you want to sanity-check why a particular generator was recommended, or
the recommendation looks wrong (or none was given) and you want to know what else is worth trying.
Your column looks like… |
Try this generator |
Why |
|---|---|---|
A unique ID, e.g. an integer primary key |
|
Guarantees fresh, unique values by counting up past the highest
existing one; |
A foreign key to another table |
|
Picks a random existing value from the referenced column, so referential integrity is preserved. This is the automatic default for any foreign key column. |
A near-unique value that must look real but not be real, e.g. an email address or free-text ID |
Whichever |
|
A small set of repeating values, e.g. a status code, category or flag |
|
These are the choice proposers, offered for any column with up to
500 distinct values; they differ in how closely they copy the real
frequency of each value. |
A continuous measurement, e.g. a length, weight or price |
|
The continuous distribution proposers fit directly to the real column’s mean and standard deviation. |
Two or more numeric columns that vary together, e.g. width and height |
|
Select all the columns together ( |
The same, but some rows have one column |
the null-partitioned generators, e.g. |
Real data is split into partitions by which columns are |
A recognisable human-ish string, e.g. a first name, city or username |
The matching |
|
A date/time that should stay consistent with another date on the same
row, e.g. a |
|
Only offered once the earlier date has been given the |
A column that should just agree with a |
|
Derives the value from the other column instead of generating it independently, so the two can never disagree. |
Nothing else fits, or you just want a placeholder |
|
Always returns the same value ( |
If a column doesn’t match any row above, it’s still worth running
propose – the ranking in Built-in generators and proposers covers cases (and
combinations of String/Numeric/Date type with real-data shape)
that are awkward to summarise as a simple lookup table.
When propose recommends nothing
For a primary key or other unique column, propose will withhold a
recommendation entirely if every candidate’s synthetic sample duplicates too
often to satisfy uniqueness – rather than confidently suggesting something
that would break a constraint. Look for the sequence proposer
(generic.column_value_provider.increment) instead.
See also
Built-in generators and proposers – full generator and proposer reference, plus how the
Recommendedscore is computed.Command-Line Interface (CLI) Guide – walkthrough of
propose,compareandsetin theconfigure-generatorsCLI.