Skip to main content

Generator configuration

events

Commentary

added in 0.0.5

local configuration

global configuration

Deprecated: See maxEvents instead.

The exact number of events this generator should create. After it meets this number, this generator becomes dormant.


Examples

Local configuration

Use localConfigs to set it locally for one generator.

{
"generators": [
{
"table": "orders",
"row": {
"orderId": {
"_gen": "uuid"
},
"orderDate": {
"_gen": "dateToday"
},
"cost": {
"_gen": "normalDistribution",
"mean": 50,
"sd": 20
}
},
"localConfigs": {
"events": {
"exactly": 18000
}
}
}
]
}

Global configuration

Use globalConfigs to set it globally for all generators.

{
"generators": [
{
"table": "orders",
"row": {
"orderId": {
"_gen": "uuid"
},
"orderDate": {
"_gen": "dateToday"
},
"cost": {
"_gen": "normalDistribution",
"mean": 50,
"sd": 20
}
}
}
],
"globalConfigs": {
"events": {
"exactly": 200
}
}
}

Specification

JSON schema

{
"type": "object",
"properties": {
"exactly": {
"oneOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
}
]
}
}
}