Same data in many formats
One relational dataset generated once and encoded into every supported text output format.
- Languages
eng- Formats
csvtsvjsonjsonlyamlxml
Recipe
gbddl 1
language eng
table products rows 10 (
id int64 autoincrement primarykey
sku text unique pattern(pattern: "SKU-####")
name text words(maxWords: 3)
price decimal(8, 2) decimal(min: 1, max: 500)
)
table sales rows 30 per(products, 1, 4) (
id int64 autoincrement primarykey
product_id int64 fk(products.id)
quantity int64 integer(min: 1, max: 12)
sold_on date date(min: "2024-01-01", max: "2024-12-31")
channel text enum(values: ["online", "store", "reseller"])
)
output csv
This is the exact recipe.gbddl committed to the repository. Copy it, or download the raw source.
About this recipe
Same data in many formats
One small relational dataset — a product table and its sales — generated once and encoded into every supported text output format. The generated values are identical across formats; only the encoding differs, so a consumer can pick the shape their pipeline reads (CSV, TSV, JSON, JSON Lines, YAML or XML) without changing the data model.
What it demonstrates
- One data model, many encodings —
productsandsalesstay the same tables; the same generated rows are written as CSV, TSV, JSON, JSON Lines, YAML and XML. - A relationship carried across formats —
sales.product_idreferencesproducts.id, and the parent/child relationship and key values survive every encoding unchanged.
Tables
products(10 rows): a unique SKU, a name, and a price.sales(30 rows, grouped 1–4 per product): quantity, sale date and channel, each referencing its product.
Run it
Submit the recipe body to POST /api/v1/jobs?input_format=gbddl (or paste it
into Chef) and choose the output format. The repository runner exercises all
six declared formats through the same parse → plan → generate → encode →
verify pipeline and asserts that each one satisfies the declared rules with the
same row counts.
Expected outputs
csv/tsv/jsonl— one file per table.json/yaml/xml— one document per table.
Guarantees
Every row has a unique id and every product a unique sku; the sales →
products foreign key holds and the generated values are the same in every
format. Values are synthetic and do not name real products or sales.
Tested features
Smart types, physical types, rules and formats this recipe exercises and verifies.
patternwordsdecimalintegerdateenumprimary-keyuniquefkperautoincrement