Datagen RealtimeTrigger

Datagen RealtimeTrigger

Certified

Stream generated data in real time

Continuously runs the generator with backpressure. Controls include throughput per second (minimum 1), maxRecords cap (default unlimited), and reportingInterval for stats; data is emitted in trigger output, not stored.

yaml
type: io.kestra.plugin.datagen.core.RealtimeTrigger
yaml
id: datagen_person_realtime_trigger_json
namespace: com.example.datagen

tasks:
  - id: log
    type: io.kestra.plugin.core.log.Log
    message: "Created: {{ trigger.value.name }} ({{ trigger.value.email }})!"

triggers:
  - id: datagen
    type: io.kestra.plugin.datagen.core.RealtimeTrigger
    throughput: 10
    reportingInterval: PT5S
    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

Data generator

Generator used for each emitted record; not stored, only emitted in trigger outputs.

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.

Default9223372036854775807

Total number of records

Hard limit on records emitted; defaults to unlimited when not set.

DefaultPT15S

Reporting interval

Period for throughput reporting; defaults to 15 seconds.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

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

Default1

Trigger throughput

Approximate records per second; values below 1 are rounded up to 1.

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.