String
The String field generates a random string of various types and lengths.
Schema
fields:
- name: Words
type: String
args:
subtype: Words
range:
start: 0
end: 10
null_probability: 0.5
- name: Paragraph
type: String
args:
subtype:
range:
start: 1
end: 3
constraints:
- type: IfNull
name: Name
Ouput
| Words | Paragraph |
|---|---|
| quo repellat qui voluptatem dolor. perspiciatis sapiente aut voluptatibus molestias qui a placeat. dicta animi distinctio est. consequuntur fugit praesentium vero. natus omnis reiciendis officia. quia sequi esse qui. est animi voluptas deleniti id. sint quia cumque eum. illo incidunt quo adipisci recusandae. temporibus molestiae rerum culpa. | |
| perspiciatis voluptas qui | |
| sint illum itaque totam |
Arguments
| Name | Type | Description | Default |
|---|---|---|---|
| subtype | string | The type of string to generate. One of Words, Sentences, Paragraphs. | Words |
| range.start | Range | The minimum length of 'things' to generate. | 1 |
| range.end | Range | The maximum length of 'things' to generate. | 2 |
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. |