WorkLensDocs
    Studio
    example

    vehicle-rental

    Intermediate: 4 tables, 5 relationships, 8 scenarios — a complete recipe you can run as shipped.

    Last updated 2026-09-13 · Generated from examples/vehicle-rental.wl.json · Markdown

    Summary

    vehicle-rental. A worked, COMMENTED example of the recipe language at medium complexity. Every _-prefixed key in this file is a comment: the engine does not execute them, validate_recipe records them in declared_not_executed, and they are the only supported way to annotate a recipe. There is no note key. 4 tables (Branch, Vehicle, Customer, Hire), 662 rows as declared, 5 relationships, 8 scenarios. Seed 20260901, so running it reproduces exactly the data described here.

    examples/vehicle-rental.wl.json4 tables
    worklens bundleseed 20260901
    Run folderdata + proof

    Tables

    • Branch — 8 fields, 12 rows, tree
    • Vehicle — 7 fields, 90 rows
    • Customer — 10 fields, 300 rows
    • Hire — 20 fields, 260 rows, 2 constraints, flow

    Relationships

    • Vehicle.home_branch_id → Branch.branch_id (fk)
    • Hire.customer_id → Customer.customer_id (fk)
    • Hire.vehicle_id → Vehicle.vehicle_id (fk)
    • Hire.pickup_branch_id → Branch.branch_id (fk)
    • Hire.vehicle_id → Hire.starts_on (unique) — one vehicle, one start date

    Scenarios

    • clean — as declared, no rates changed
    • import_rejects — sets invalid_format_rate, null_rate, typo_rate
    • orphans — sets broken_fk_rate
    • outliers — sets outlier_rate, outlier_magnitude
    • duplicates — sets duplicate_rate
    • date_anomalies — sets date_anomaly_rate
    • known_bad — sets defects
    • volume — sets rows

    Recipe keys used

    • after, aggregate, column, constraints, derive, fanout, flow, from, max, min, month_weights, no_overlap, nullable, params_when, pattern, present_when, ref, relationships, role, rollup, rows, scenarios, scope, seed, sensitivity, shape, table, tree, type, type_def, unique, values, weights, weights_when

    Run it

    validate_recipe -> sample_world (cheap, 120 rows, catches vacuous declarations) -> generate_from_graph -> prove_recipe.

    Seed 20260901 is in the file, so the bytes are the same on every machine.