Reproducible test dataset
A stable, related customers/orders/items dataset that regenerates byte-for-byte from a fixed seed.
- Languages
eng- Formats
csv
Recipe
gbddl 1
language eng
table customers rows 8 (
id int64 autoincrement primarykey
code text unique pattern(pattern: "CUST-###")
name text company()
country text country()
)
table orders rows 24 per(customers, 1, 4) (
id int64 autoincrement primarykey
customer_id int64 fk(customers.id)
number text unique pattern(pattern: "ORD-#####")
placed_on date date(min: "2024-01-01", max: "2024-12-31")
status text enum(values: ["new", "paid", "shipped", "closed"])
)
table order_items rows 48 per(orders, 1, 3) (
id int64 autoincrement primarykey
order_id int64 fk(orders.id)
sku text pattern(pattern: "SKU-####")
quantity int64 integer(min: 1, max: 5)
unit_cost decimal(8, 2) decimal(min: 5, max: 200)
)
output csv
This is the exact recipe.gbddl committed to the repository. Copy it, or download the raw source.
About this recipe
Reproducible test dataset
A stable, related dataset — customers, their orders, and those orders' line items — meant for repeatable tests: CI fixtures, snapshot tests, and demos that need the same rows on every run. With the runner's fixed seed, regenerating this recipe produces byte-for-byte identical output, so an expected file can be committed and compared.
What it demonstrates
- Fixed seed, repeatable relations — the same seed always produces the same customers, the same orders under each customer, and the same items under each order, with the same foreign keys, so the whole graph is stable across runs.
- A three-level hierarchy —
customers→orders→order_items, joined by explicit foreign keys and sized withper, the classic shape of an order-management fixture.
Tables
customers(8 rows): a unique code, a company name, and a country.orders(24 rows, 1–4 per customer): a unique order number, placement date and status, each referencing its customer.order_items(48 rows, 1–3 per order): SKU, quantity and unit cost, each referencing its order.
Run it
Submit the recipe body to POST /api/v1/jobs?input_format=gbddl (or paste it
into Chef). The repository runner pins the generation seed, so the CSV output
is identical on every run; TestGenerationRepeatable regenerates it twice and
asserts the bytes match.
Expected outputs
Three CSV files: customers.csv, orders.csv and order_items.csv.
Guarantees
Every id is unique and each orders.customer_id and
order_items.order_id references an existing parent row; the generated values
are deterministic for a fixed seed. Values are synthetic and do not name real
customers or orders.
Tested features
Smart types, physical types, rules and formats this recipe exercises and verifies.
companycountrypatterndateenumintegerdecimalprimary-keyuniquefkperautoincrement