Skip to content

Survey responses with enums and nulls

Survey answers with ratings, booleans, an optional comment and a channel.

simple volume small SurveysPeople
Languages
eng
Formats
csv

Recipe

recipe.gbddl
gbddl 1
language eng

table survey_responses rows 20 (
  id           int64 autoincrement primarykey
  respondent   text username()
  satisfaction text enum(values: ["1", "2", "3", "4", "5"])
  recommend    boolean boolean(trueRate: 70%)
  comment      text null(40%) sentence(maxWords: 12)
  channel      text enum(values: ["web", "mobile", "email", "in_person"])
  consent      boolean boolean(trueRate: 95%)
)

output csv

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

About this recipe

Survey responses

A single-table recipe that generates survey answers: ratings, booleans, an optional comment and a channel.

What it demonstrates

  • Enums — satisfaction and channel pick from fixed enum lists.
  • Booleans — recommend and consent are biased boolean values.
  • Nulls — comment is a sentence that is null in 40% of rows.

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

Adapt it

  • Change the enum values to your own scale or channels.
  • Adjust the trueRate to bias the booleans differently.

Guarantees

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

Tested features

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

usernameenumbooleansentencenullautoincrementprimary-key