Skip to content

Supplier master data with addresses and contacts

Suppliers with related addresses and contact people.

related volume small SuppliersContactRelationships
Languages
eng
Formats
csv

Recipe

recipe.gbddl
gbddl 1
language eng

table suppliers rows 8 (
  id     int64 autoincrement primarykey
  name   text company()
  vat_id text unique vatId()
)

table supplier_addresses rows 12 per(suppliers, 1, 2) (
  id          int64 autoincrement primarykey
  supplier_id int64 fk(suppliers.id)
  street      text street()
  city        text same(geo) city()
  country     text same(geo) country()
)

table supplier_contacts rows 16 per(suppliers, 1, 3) (
  id          int64 autoincrement primarykey
  supplier_id int64 fk(suppliers.id)
  full_name   text same(person) fullName()
  email       text same(person) email()
)

output csv

This is the exact recipe.gbddl committed to the repository. Copy it, or download the raw source.

About this recipe

Supplier master data

A multi-table recipe that generates supplier master data: suppliers with related addresses and contact people.

What it demonstrates

  • Relationships — supplier_addresses and supplier_contacts reference suppliers.
  • Address coherence — street, city and country describe one place, with city and country in a same(geo) group.
  • Contact coherence — full_name and email share a same(person) group.

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 CSV files: suppliers.csv, supplier_addresses.csv and supplier_contacts.csv.

Guarantees

Every foreign key names an existing parent row, per(...) grouping holds, and address and contact fields are coherent per row. Values are synthetic.

Tested features

Smart types, physical types, rules and formats this recipe exercises and verifies.

companyvatIdstreetcitycountryfullNameemailuniquesame:geographysame:personfkperautoincrementprimary-key