Datagen Trigger

Datagen Trigger

Certified

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.

yaml
type: io.kestra.plugin.datagen.core.Trigger
yaml
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

Choose data generator

Generator used for each record; required for all generate tasks and triggers.

Definitions

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.

type*Requiredobject
value*Requiredobject

Object template

Map of key-value pairs rendered per record; strings starting with #{ are evaluated by Datafaker, including nested maps and lists.

localearray
SubTypestring

Locales

Optional locale list in the format [language, country, variant]; empty list uses Faker's default locale.

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.

type*Requiredobject
sizeinteger
Default0

Byte array size

Number of bytes produced per record; should be greater than zero

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.

type*Requiredobject
value*Requiredstring

String template

String rendered per record; supports Pebble variables and Datafaker expressions starting with #{

localearray
SubTypestring

Locales

Optional locale list in the format [language, country, variant]; empty list uses Faker's default locale.

Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

Default1

Batch size

Number of items to generate when storing data; only used if store is true. Defaults to 1.

DefaultPT1S
Formatduration

Interval 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.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Defaultfalse

Store generated data

Persist output to Kestra internal storage as ION lines when true; defaults to false to return the value inline.

Defaulttrue

A 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.

Items generated

Number of records produced by the generator.

Generated size (bytes)

Total size in bytes of the returned value or stored ION file.

Formaturi

Stored file URI

URI in internal storage when store is true; null for inline outputs.

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.