@Bool()
New in 2.0Generate boolean values
Data TypesSince 2.0.0
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| trueWeight | — | — | True ratio, e.g. "2:1" means 2 true per 3 values on average | |
| nullSampler | — | — | The null ratio, such as "1:2", indicates that generating a random value 3 times with an average of 1 time is null | |
| dict | — | — | Boolean dictionary values separated by "|", first=true, second=false. Default: true|false |
Usage
@Bool(arg0,arg1,arg2)Full parameter constructor, see complete parameter documentation
Example:
@Bool(2:1,1:5,1|0)
Output:
1null0@Bool(arg0,arg1)Generate true/false/null with specified true and null ratios
Example:
@Bool(2:1,1:5)
Output:
truenullfalse@Bool(arg0)Generate true/false/null with specified null ratio
Example:
@Bool(2:1)
Output:
truetruefalse@Bool()Generate true/false with 2:1 ratio
Example:
@Bool()
Output:
truefalse