Skip to content

Support tickets

Customers, agents and their support tickets with priorities and statuses.

related volume small SupportCustomersRelationships
Languages
eng
Formats
csv

Recipe

recipe.gbddl
gbddl 1
language eng

table customers rows 8 (
  id   int64 autoincrement primarykey
  name text same(person) fullName()
)

table agents rows 4 (
  id       int64 autoincrement primarykey
  name     text same(person) fullName()
  password text password()
)

table tickets rows 24 per(customers, 1, 4) (
  id          int64 autoincrement primarykey
  customer_id int64 fk(customers.id)
  agent_id    int64 fk(agents.id)
  subject     text words(maxWords: 5)
  priority    text enum(values: ["low", "medium", "high", "urgent"])
  status      text enum(values: ["open", "in_progress", "resolved", "closed"])
  created_at  timestamp datetime(min: "2023-01-01 00:00:00", max: "2024-12-31 23:59:59")
)

output csv

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

About this recipe

Support tickets

A multi-table recipe that generates support tickets: customers, agents and their tickets.

What it demonstrates

  • Relationships — tickets references customers and agents.
  • Agent credentials — each agents row carries a password.
  • Ticket fields — priority and status are enum lists, created_at a timestamp.
  • Row distribution — per(customers, 1, 4) gives each customer one to four tickets.

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: customers.csv, agents.csv and tickets.csv.

Guarantees

Every foreign key names an existing parent row and per(...) grouping holds. Passwords are synthetic and not real credentials.

Tested features

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

fullNamepasswordwordsenumdatetimefkpersame:personautoincrementprimary-key