Skip to content

Bank statement entries

Bank accounts with statement entries carrying amounts and running balances.

related volume small BankingTransactionsRelationships
Languages
eng
Formats
csv

Recipe

recipe.gbddl
gbddl 1
language eng

table accounts rows 6 (
  id     int64 autoincrement primarykey
  iban   text unique iban()
  holder text fullName()
)

table statement_entries rows 30 per(accounts, 1, 8) (
  id          int64 autoincrement primarykey
  account_id  int64 fk(accounts.id)
  posted_on   date date(min: "2023-01-01", max: "2024-12-31")
  description text enum(values: ["Card payment", "Salary", "Rent", "Utility bill", "ATM withdrawal", "Transfer received", "Subscription", "Refund", "Insurance premium", "Supplier payment"])
  amount      decimal(12, 2) decimal(min: -10000, max: 10000)
  balance     decimal(12, 2) decimal(min: -100000, max: 1000000)
)

output csv

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

About this recipe

Bank statement

A multi-table recipe that generates bank statements: accounts with statement entries carrying amounts and running balances.

What it demonstrates

  • Relationships — statement_entries references accounts.
  • Row distribution — per(accounts, 1, 8) gives each account one to eight entries.
  • Account identity — iban is a check-digit-valid IBAN, unique per account.

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 CSV files: accounts.csv and statement_entries.csv.

Guarantees

Every primary key is unique, every foreign key names an existing parent row, and per(...) grouping holds. The balance is synthetic, not a reconciled running total.

Tested features

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

enumibanfullNamedatedecimaluniquefkperautoincrementprimary-key