
Datagen Trigger
CertifiedPoll to generate data batches
Datagen Trigger
Poll to generate data batches
Periodically invokes the generator and emits an execution. Defaults: store=false, batchSize=1, interval=PT1S. Use store=true to persist ION lines to internal storage instead of embedding the value.
type: io.kestra.plugin.datagen.core.TriggerExamples
id: datagen_person_trigger_json
namespace: com.example.datagen
tasks:
- id: log
type: io.kestra.plugin.core.log.Log
message: "Created: {{ trigger.uri }}"
triggers:
- id: datagen
type: io.kestra.plugin.datagen.core.Trigger
batchSize: 10
store: true
generator:
type: io.kestra.plugin.datagen.generators.JsonObjectGenerator
locale: ["fr", "FR"]
value:
name: "#{name.fullName}"
email: "#{internet.emailAddress}"
age: 30
address:
city: "#{address.city}"
zip: "#{address.zipCode}"
skills: [ "#{job.keySkills}", "#{job.position}", "hardcoded" ]
ts: "{{ now() }}"
Properties
generator *RequiredNon-dynamic
Choose data generator
Generator used for each record; required for all generate tasks and triggers.
Generate JSON objects from templates
Renders the value map, then evaluates Datafaker expressions (#{...}) on every record. Supports nested maps/lists; locale list overrides Faker locale, otherwise the library default is used.
Object template
Map of key-value pairs rendered per record; strings starting with #{ are evaluated by Datafaker, including nested maps and lists.
Locales
Optional locale list in the format [language, country, variant]; empty list uses Faker's default locale.
Generate random byte arrays
Allocates a byte array of the configured size and fills it with SecureRandom bytes. Size should be positive; randomness relies on the JVM's default seed.
0Byte array size
Number of bytes produced per record; should be greater than zero
Generate strings from templates
Renders the value string (Pebble) and then evaluates Datafaker expressions like #{name.firstName} for each record. Locale list overrides Faker locale; empty list uses the library default.
String template
String rendered per record; supports Pebble variables and Datafaker expressions starting with #{
Locales
Optional locale list in the format [language, country, variant]; empty list uses Faker's default locale.
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
batchSize integerstring
1Batch size
Number of items to generate when storing data; only used if store is true. Defaults to 1.
interval Non-dynamicstring
PT1SdurationInterval between polling.
The interval between 2 different polls of schedule, this can avoid to overload the remote system with too many calls. For most of the triggers that depend on external systems, a minimal interval must be at least PT30S. See ISO_8601 Durations for more information of available interval values.
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
store booleanstring
falseStore generated data
Persist output to Kestra internal storage as ION lines when true; defaults to false to return the value inline.
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
count integer
Items generated
Number of records produced by the generator.
size integer
Generated size (bytes)
Total size in bytes of the returned value or stored ION file.
uri string
uriStored file URI
URI in internal storage when store is true; null for inline outputs.
value object
Generated value
Inline content when store is false; null when data is stored. May be string, number, JSON object, or byte array depending on the generator.