Skip to content

Fixed assets with cost and useful life

A fixed asset register with tags, categories, cost, useful life and acquisition dates.

simple volume small AssetsFinance
Languages
eng
Formats
csv

Recipe

recipe.gbddl
gbddl 1
language eng

table fixed_assets rows 15 (
  id           int64 autoincrement primarykey
  asset_tag    text unique pattern(pattern: "AST-#####")
  serial_no    text unique regexp(pattern: "[A-Z]{2}[0-9]{8}")
  name         text words(maxWords: 3)
  category     text enum(values: ["equipment", "vehicle", "building", "software", "furniture"])
  cost         decimal(12, 2) decimal(min: 1000, max: 1000000)
  depreciation text enum(values: ["linear", "declining", "units"])
  useful_life  int64 integer(min: 1, max: 40)
  acquired_on  date date(min: "2010-01-01", max: "2024-12-31")
  active       boolean boolean(trueRate: 90%)
)

output csv

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

About this recipe

Fixed assets

A single-table recipe that generates a fixed asset register: tags, categories, cost, useful life and acquisition dates.

What it demonstrates

  • Asset identity — asset_tag is a unique pattern mask, and the manufacturer's serial_no a unique regexp of two letters and eight digits.
  • Classification — category picks from an enum, and so does the depreciation method (straight-line, declining balance or units of production).
  • Financial fields — cost is a decimal amount and useful_life an integer range.
  • Dates and flags — acquired_on is a date and active a boolean.

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, fixed_assets.csv, holding fifteen rows.

Adapt it

  • Raise rows for a larger register.
  • Change the enum values to your own asset classes.

Guarantees

Every row has a unique id and asset_tag. Values are synthetic.

Tested features

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

patternregexpwordsenumdecimalintegerdatebooleanuniqueautoincrementprimary-key