Skip to content

Application events with text and nulls

System events with types, messages, security fields, binary payloads and nulls.

simple volume small EventsSurveys
Languages
eng
Formats
csv

Recipe

recipe.gbddl
gbddl 1
language eng

table application_events rows 25 (
  id            int64 autoincrement primarykey
  event_type    text enum(values: ["login", "logout", "purchase", "refund", "error"])
  message       text null(15%) sentence(maxWords: 8)
  summary       text phrase(maxWords: 6)
  details       text null(20%) lorem(maxWords: 12)
  severity      text logLevel()
  token         text jwt()
  user          text username()
  password_hash text hash(algorithm: "sha256", sourceField: "token")
  payload       bytes binary(minBytes: 4, maxBytes: 16)
  encoded       text base64()
  color_code    text color(palette: "safe")
  occurred_at   timestamp datetime(min: "2024-01-01 00:00:00", max: "2024-06-30 23:59:59")
)

output csv

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

About this recipe

Application events

A single-table recipe that generates system events with types, messages, security fields, binary payloads and nulls.

What it demonstrates

  • Event types — event_type picks from an enum, severity a log level.
  • Text and nulls — message is a sentence that is null in 15% of rows, summary a short phrase, and details a lorem-ipsum run that is null in 20% of rows.
  • Security — token is a JWT, user a username, password_hash the SHA-256 digest of the token, payload raw bytes, encoded base64 text and color_code a web-safe color.

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

Adapt it

  • Change the enum values to your own event vocabulary.
  • Use hash(algorithm: "sha512", template: "{{event_type}}") to digest a template instead of a column.

Guarantees

Every row has a unique id; message is null in the declared share of rows. Events are synthetic.

Tested features

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

enumsentencelogLeveljwtusernamehashbinarybase64colordatetimenullautoincrementprimary-keyphraselorem