Description
Generate synthetic category and integer rows for supplied equality or exact-decimal greater-than predicates, retaining per-row pass labels and delegated CSV filter answers without evaluating expressions.
CSV stores records as delimited text fields. Quoting can protect embedded delimiters and newlines, so a record need not equal one physical line. Cleaning field contents, interpreting their types, and preserving an exact import/export round trip are separate operations.
Generate synthetic category and integer rows for supplied equality or exact-decimal greater-than predicates, retaining per-row pass labels and delegated CSV filter answers without evaluating expressions.
When to use this tool
Use this generator to create reproducible csv filter expression practice cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply categories, rowCount, minimumValue, maximumValue, predicates in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read rows, csv, exercises. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.
Draw category/amount rows and serialize them once. For every supplied predicate, delegate exact category equality or strict numeric-greater filtering and independently return a per-row passes mask using exact decimal comparison.1
Delegated operations used for this result: filter rows column equals value; filter rows numeric greater threshold. Their calculation or parsing conventions apply to the corresponding result fields.2, 3
| Input field | Meaning and units | Accepted input |
|---|---|---|
| categories | Categories | Required. Array of Text; maximum UTF-16 length 64.; minimum items 1; maximum items 16. |
| rowCount | Row Count | Required. Safe integer; minimum 1; maximum 32. |
| minimumValue | Minimum Value | Required. Safe integer. |
| maximumValue | Maximum Value | Required. Safe integer. |
| predicates | Predicates | Required. Array of Object; no unknown keys. or Object; no unknown keys.; minimum items 1; maximum items 8. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| rows | Rows | Required. Array of Object; no unknown keys.; minimum items 0; maximum items 32. |
| rows[].category | Category | Required. Text; maximum UTF-16 length 64. |
| rows[].amount | Amount | Required. Safe integer. |
| csv | Csv | Required. Text; maximum UTF-16 length 100000. |
| exercises | Exercises | Required. Array of Object; no unknown keys.; minimum items 0; maximum items 8. |
| exercises[].predicate | Predicate | Required. Object; no unknown keys. or Object; no unknown keys. |
| exercises[].passes | Passes | Required. Array of Boolean.; minimum items 0; maximum items 32. |
| exercises[].selectedCsv | Selected Csv | Required. Text; maximum UTF-16 length 100000. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"categories": [
"red",
"blue"
],
"rowCount": 2,
"minimumValue": 0,
"maximumValue": 9,
"predicates": [
{
"kind": "equals",
"value": "blue"
},
{
"kind": "greater",
"value": "5"
}
],
"seed": 42
},
"output": {
"rows": [
{
"category": "blue",
"amount": 4
},
{
"category": "blue",
"amount": 6
}
],
"csv": "category,amount\nblue,4\nblue,6",
"exercises": [
{
"predicate": {
"kind": "equals",
"value": "blue"
},
"passes": [
true,
true
],
"selectedCsv": "category,amount\nblue,4\nblue,6"
},
{
"predicate": {
"kind": "greater",
"value": "5"
},
"passes": [
false,
true
],
"selectedCsv": "category,amount\nblue,6"
}
],
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- Greater is strict, not greater-or-equal. Predicates use the supported two forms rather than a general expression language. Supplied thresholds must parse and selection is a test answer rather than a real analytical finding.
- A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random CSV Pivot Practice Dataset Generator
Construct exact-count repeated categorical groups with seeded integer/missing values, serialize to CSV and delegate count/sum/mean/min/max pivot answers; count includes missing-value rows, other aggregates omit missing values and return zero for all-missing groups, with the core's floating arithmetic and sorted group keys—not a missing cross-tab fill rule.
- Random CSV Aggregate Reconciliation Exercise Generator
Generate synthetic grouped integer observations, plant one declared subtotal discrepancy and retain exact decimal-string subtotal, grand-total and checksum-row reconciliation answers.