Skip to content

Wide records across every physical type

One wide table that exercises all fourteen physical types with matching smart types.

simple volume small CustomersFormats
Languages
eng
Formats
csv

Recipe

recipe.gbddl
gbddl 1
language eng

table wide_customers rows 20 (
  id         int64 autoincrement primarykey
  small      int16 integer(min: 0, max: 30000)
  medium     int32 integer(min: 0, max: 2000000000)
  big        int64 integer(min: 0, max: 9000000000000000000)
  ratio      float64 decimal(min: 0, max: 1)
  price      decimal(12, 4) decimal(min: 0, max: 1000000)
  label      text words(maxWords: 2)
  short      varchar(8) pattern(pattern: "??-####")
  born       date date(min: "1950-01-01", max: "2005-12-31")
  wake       time time()
  created    timestamp datetime(min: "2020-01-01 00:00:00", max: "2024-12-31 23:59:59")
  created_tz timestamptz datetime(min: "2020-01-01 00:00:00", max: "2024-12-31 23:59:59")
  uuid       uuid uuid()
  raw        bytes binary(minBytes: 2, maxBytes: 8)
  active     boolean boolean(trueRate: 80%)
)

output csv

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

About this recipe

Wide customer records

A single-table recipe with one wide table that exercises all fourteen physical types, each paired with a compatible smart type.

What it demonstrates

  • Physical types — boolean, int16, int32, int64, decimal, float64, text, varchar, date, time, timestamp, timestamptz, uuid and bytes each appear as a column with a matching smart type.
  • Width — a table with many columns in one record, written as a single CSV row per record.

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, wide_customers.csv, holding twenty rows.

Adapt it

  • Add more columns to widen the record further.
  • Change the output format to exercise the same columns in another encoding.

Guarantees

Every row has a unique id; each column holds a value of its physical type. Values are synthetic.

Tested features

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

integerdecimalwordspatterndatetimedatetimeuuidbinarybooleanautoincrementprimary-keytype:booleantype:int16type:int32type:int64type:decimaltype:float64type:texttype:varchartype:datetype:timetype:timestamptype:timestamptztype:uuidtype:bytes