Skip to content

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.

simple volume small ProductsImportPricingIdentifiers
Languages
eng
Formats
csv

Recipe

recipe.gbddl
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_code is 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 — gtin is a GS1 trade item number with a valid check digit and is unique.
  • Identity — name is a short product name and description a nullable filler sentence (one in five products has none).
  • Classification — category is a fixed enum, and unit / unit_erp write the same unit of measure as a UN/ECE code and as a short ERP code.
  • Pricing — price and cost are bounded decimal amounts.
  • Lifecycle — available_from is a date range and active is 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_code mask to match your source system's reference format.
  • Add or drop columns to mirror the exact columns of your import template.
  • Replace the category values with the categories your target system accepts.
  • Raise rows to 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