Shipment tracking
Shipments and their tracking status events.
related
volume small
ShippingEventsRelationships
- Languages
eng- Formats
csv
Recipe
gbddl 1
language eng
table shipments rows 12 (
id int64 autoincrement primarykey
tracking text unique pattern(pattern: "TRK-########")
carrier text enum(values: ["dhl", "ups", "fedex", "usps"])
)
table status_events rows 40 per(shipments, 1, 5) (
id int64 autoincrement primarykey
shipment_id int64 fk(shipments.id)
status text enum(values: ["label_created", "picked_up", "in_transit", "out_for_delivery", "delivered"])
at timestamp datetime(min: "2023-01-01 00:00:00", max: "2024-12-31 23:59:59")
location text city()
)
output csv
This is the exact recipe.gbddl committed to the repository. Copy it, or download the raw source.
About this recipe
Shipment tracking
A multi-table recipe that generates shipment tracking: shipments and their status events.
What it demonstrates
- Relationships —
status_eventsreferencesshipments. - Tracking identity —
trackingis auniquepatternmask. - Status progression —
statuspicks from anenumof lifecycle states, eachata timestamp and alocation.
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: shipments.csv and status_events.csv.
Guarantees
Every foreign key names an existing parent row, per(...) grouping holds, and
tracking is unique. Values are synthetic.
Tested features
Smart types, physical types, rules and formats this recipe exercises and verifies.
patternenumdatetimecityuniquefkperautoincrementprimary-key