name: op-synth-monotonic-from
description: Strictly increasing or decreasing integer counter; deterministic per row, ignores RNG. Synthetic primary keys.
kind: operator
category: SYNTH
operator: monotonic_from
type: reference
applies_to: inspect, predict, manifest
examples_tags: [synth, cohort-analysis]
Synth distributions emit per-row values; no Response.Components. No MCP tool runs synth: the CLI (pulse synth from-schema) or Pulse.Synth does (synthetic-data).
Use when
Counts up (or down) by a fixed step from a start value, one step per row, to make unique IDs or row numbers.
Questions it answers:
- How do I give each synthetic row a unique customer ID?
- How do I number rows from 1000 upward?
Use something else:
constantwhen every row should get the same value.uniformwhen the numbers should be random, not in order.regexwhen IDs should be text codes like AB-1234.
Params
| Name | Type | Default | Description |
|---|---|---|---|
start | int | 0 | First emitted value. |
step | int | 1 | Non-zero. Negative ⇒ decreasing. |
Row 0 emits start; the step commits only after a row is ACCEPTED.
Inputs
Field type: — numeric u4/u8/u16/u32/u64, f32/f64. u64 for primary keys.
Output
Per-row float64 start + i * step for ACCEPTED row i (the ordinal row() reads). Consumes no randomness.
Contract
- Applies to:
numericfields.
Gotchas
step == 0→SERVICE_VALIDATIONbefore any row is written.- Consumes NO RNG — adding / removing a
monotonic_fromfield is the only spec edit preserving byte-equality of every other field’s stream. - A constraint-rejected attempt redraws the SAME value, so the field has no gaps.
- Out-of-range values saturate SILENTLY —
start=250, step=10overu8writes 255 from row 1 on (a negative run stops at 0). Declare wide enough, or useu64. - The seed does not affect it.