Generic product import columns
A flat product import file: an external reference, a barcode, a name and nullable description, a category, units of measure, a price and cost, an available-from date and a status flag.
- Languages
eng- Formats
csv
Recipe
gbddl 1
language eng
table products rows 20 (
id int64 autoincrement primarykey
product_code text unique pattern(pattern: "PRD-######")
gtin varchar(13) unique gtin()
name text words(maxWords: 4)
description text null(20%) sentence(maxWords: 12)
category text enum(values: ["electronics", "apparel", "food", "office", "tools"])
unit text unitOfMeasure()
unit_erp text unitOfMeasure(style: "erp")
price decimal(10, 2) decimal(min: 0.01, max: 5000)
cost decimal(10, 2) decimal(min: 0.01, max: 3500)
available_from date date(min: "2020-01-01", max: "2026-06-30")
active boolean boolean(trueRate: 85%)
)
output csv
This is the exact recipe.gbddl committed to the repository. Copy it, or download the raw source.
About this recipe
Product import
A single-table recipe that generates a flat product import file: one row per product, shaped like the interchange CSV an integration tool or spreadsheet would hand to a target system. It is a generic import shape, not compliance with any named ERP.
What it demonstrates
- External reference —
product_codeis a source-system code (PRD-######) and is unique, the way an import file carries its own key instead of relying on an internal id. - Barcode —
gtinis a GS1 trade item number with a valid check digit and is unique. - Identity —
nameis a short product name anddescriptiona nullable filler sentence (one in five products has none). - Classification —
categoryis a fixedenum, andunit/unit_erpwrite the same unit of measure as a UN/ECE code and as a short ERP code. - Pricing —
priceandcostare bounded decimal amounts. - Lifecycle —
available_fromis a date range andactiveis a boolean status flag.
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 one CSV table file, products.csv, holding twenty products.
Adapt it
- Change the
product_codemask to match your source system's reference format. - Add or drop columns to mirror the exact columns of your import template.
- Replace the
categoryvalues with the categories your target system accepts. - Raise
rowsto produce a larger import file.
Guarantees
Every row has a unique id, product_code and gtin, and the price and cost
stay inside their declared ranges. Values are synthetic and do not name real
products.
Tested features
Smart types, physical types, rules and formats this recipe exercises and verifies.
patterngtinwordssentenceenumunitOfMeasuredecimaldatebooleannulluniqueautoincrementprimary-key