IntegerInRange

The IntegerInRange field generates a random integer between a minimum and maximum value.

Schema

fields:
  - name: Zero
    type: IntegerInRange
    args:
      min: -20
      max: 20
    null_probability: 0
  - name: One
    type: IntegerInRange
    null_probability: 0
    args:
      min: 0
      max: 500
    constraints:
      - type: GreaterThan
        name: Zero

Output

ZeroOne
-2056
166
-13294

Arguments

NameTypeDescriptionDefault
minintThe minimum value0
maxintThe maximum valuei64::MAX

Field arguments

NameTypeDescriptionDefault Value
null_probabilityfloatThe probability that the field will be null.0.0
constraintslistA list of constraints to apply to the field.[]

Supported constraints

NameDescription
GreaterThanThe value must be greater than the value of another field.
IfNullThe value must only be non-null if another field is null.