Warehouse locations and codes
Warehouses with codes, names, a coherent location and a capacity.
simple
volume small
LocationsInventory
- Languages
eng- Formats
csv
Recipe
gbddl 1
language eng
table warehouses rows 10 (
id int64 autoincrement primarykey
code text unique pattern(pattern: "WH-###")
name text words(maxWords: 2)
city text same(geo) city()
country text same(geo) country()
capacity int64 integer(min: 1000, max: 1000000)
active boolean boolean(trueRate: 95%)
)
output csv
This is the exact recipe.gbddl committed to the repository. Copy it, or download the raw source.
About this recipe
Warehouses
A single-table recipe that generates warehouses: codes, names, a coherent location and a capacity.
What it demonstrates
- Identity —
codeis auniquepatternmask andnamedrawn words. - Location —
cityandcountryshare asame(geo)group, so they describe one place. - Capacity —
capacityis an integer range andactivea boolean.
Run it
Submit the recipe body to POST /api/v1/jobs?input_format=gbddl, or paste it
into Chef, to generate the data. The repository's local runner (run by
task test) also generates it and verifies its output.
The recipe outputs one CSV table file, warehouses.csv, holding ten rows.
Adapt it
- Add a
country_codecolumn to thesame(geo)group. - Raise
rowsfor a larger network of warehouses.
Guarantees
Every row has a unique id and code; the location fields are coherent per
row. Values are synthetic.
Tested features
Smart types, physical types, rules and formats this recipe exercises and verifies.
patternwordscitycountryintegerbooleanuniquesame:geographyautoincrementprimary-key