Boolean

The Boolean field is used to generate a random boolean value.

Schema

fields:
  - name: BoolMaybeNull
    type: Boolean
    null_probability: 0.5
  - name: Bool
    type: Boolean
    constraints:
      - type: IfNull
        name: BoolMaybeNull

Output

BoolMaybeNullBool
true
true
true
true
false

Arguments

NameTypeDescriptionDefault

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
IfNullThe value must only be non-null if another field is null.