Digit
The Digit field type generates a random digit.
Schema
fields:
- name: Digit One
type: Digit
null_probability: 0.5
- name: Digit Two
type: Digit
constraints:
- type: IfNull
name: Digit One
Output
| Digit One | Digit Two |
|---|---|
| 1 | |
| 3 | |
| 8 | |
| 6 | |
| 4 |
Arguments
| Name | Type | Description | Default |
|---|
Field arguments
| Name | Type | Description | Default Value |
|---|---|---|---|
| null_probability | float | The probability that the field will be null. | 0.0 |
| constraints | list | A list of constraints to apply to the field. | [] |
Supported constraints
| Name | Description |
|---|---|
| IfNull | The value must only be non-null if another field is null. |