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
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_tagis auniquepatternmask, and the manufacturer'sserial_noauniqueregexpof two letters and eight digits. - Classification —
categorypicks from anenum, and so does thedepreciationmethod (straight-line, declining balance or units of production). - Financial fields —
costis a decimal amount anduseful_lifean integer range. - Dates and flags —
acquired_onis a date andactivea 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
rowsfor a larger register. - Change the
enumvalues 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