RealtimeTrigger
yaml
type: "io.kestra.plugin.azure.eventhubs.realtimetrigger"
Examples
yaml
id: azure_eventhubs_realtime_trigger
namespace: company.team
tasks:
- id: log
type: io.kestra.plugin.core.log.Log
message: Hello there! I received {{ trigger.body }} from Azure EventHubs!
triggers:
- id: read_from_eventhub
type: io.kestra.plugin.azure.eventhubs.RealtimeTrigger
eventHubName: my_eventhub
namespace: my_eventhub_namespace
connectionString: "{{ secret('EVENTHUBS_CONNECTION') }}"
bodyDeserializer: JSON
consumerGroup: "$Default"
checkpointStoreProperties:
containerName: kestra
connectionString: "{{ secret('BLOB_CONNECTION') }}"
yaml
id: eventhubs_realtime_trigger
namespace: company.team
tasks:
- id: insert_into_storagetable
type: io.kestra.plugin.azure.storage.table.Bulk
endpoint: https://yourstorageaccount.blob.core.windows.net
connectionString: "{{ secret('STORAGETABLE_CONNECTION') }}"
table: orders
from:
- partitionKey: order_id
rowKey: "{{ trigger.body | jq('.order_id') | first }}"
properties:
customer_name: "{{ trigger.body | jq('.customer_name') | first }}"
customer_email: "{{ trigger.body | jq('.customer_email') | first }}"
product_id: "{{ trigger.body | jq('.product_id') | first }}"
price: "{{ trigger.body | jq('.price') | first }}"
quantity: "{{ trigger.body | jq('.quantity') | first }}"
total: "{{ trigger.body | jq('.total') | first }}"
triggers:
- id: realtime_trigger
type: io.kestra.plugin.azure.eventhubs.RealtimeTrigger
eventHubName: orders
namespace: kestra
connectionString: "{{ secret('EVENTHUBS_CONNECTION') }}"
bodyDeserializer: JSON
consumerGroup: $Default
checkpointStoreProperties:
containerName: kestra
connectionString: "{{ secret('BLOB_CONNECTION') }}"
Properties
eventHubName *Requiredstring
namespace *Requiredstring
bodyDeserializer string
Default
STRING
Possible Values
STRING
BINARY
ION
JSON
bodyDeserializerProperties object
Default
{}
checkpointStoreProperties object
SubType string
Default
{}
clientMaxRetries integerstring
Default
5
clientRetryDelay integerstring
Default
500
conditions Non-dynamicDateTimeBetweenDayWeekDayWeekInMonthExecutionFlowExecutionLabelsExecutionNamespaceExecutionOutputsExecutionStatusExpressionFlowConditionFlowNamespaceConditionHasRetryAttemptMultipleConditionNotOrPublicHolidayTimeBetweenWeekend
connectionString string
consumerGroup string
Default
$Default
customEndpointAddress string
enqueueTime string
partitionStartingPosition string
Default
EARLIEST
Possible Values
EARLIEST
LATEST
INSTANT
sasToken string
stopAfter Non-dynamicarray
SubType string
Possible Values
CREATED
RUNNING
PAUSED
RESTARTED
KILLING
SUCCESS
WARNING
FAILED
KILLED
CANCELLED
QUEUED
RETRYING
RETRIED
SKIPPED
BREAKPOINT
Outputs
body object
contentType string
correlationId string
enqueuedTimestamp integer
messageId string
offset integer
partitionKey string
properties object
sequenceNumber integer
Definitions
io.kestra.core.models.triggers.TimeWindow
deadline string
Format
partial-time
endTime string
Format
partial-time
startTime string
Format
partial-time
type string
Default
DURATION_WINDOW
Possible Values
DAILY_TIME_DEADLINE
DAILY_TIME_WINDOW
DURATION_WINDOW
SLIDING_WINDOW
window string
Format
duration
windowAdvance string
Format
duration
Condition for a specific flow of an execution.
flowId *Requiredstring
namespace *Requiredstring
type *Requiredobject
Condition for a flow namespace.
namespace *Requiredstring
type *Requiredobject
prefix boolean
Default
false
Condition for a specific flow. Note that this condition is deprecated, use `io.kestra.plugin.core.condition.ExecutionFlow` instead.
flowId *Requiredstring
namespace *Requiredstring
type *Requiredobject
Condition to allow events between two specific times.
type *Requiredobject
after string
Format
time
before string
Format
time
date string
Default
{{ trigger.date }}
Condition that checks labels of an execution.
labels *Requiredarrayobject
type *Requiredobject
Condition based on the outputs of an upstream execution.
expression *Requiredbooleanstring
type *Requiredobject
Condition to allow events on weekend.
type *Requiredobject
date string
Default
{{ trigger.date }}
Condition to have at least one condition validated.
Condition for an execution namespace.
namespace *Requiredstring
type *Requiredobject
comparison string
Possible Values
EQUALS
PREFIX
SUFFIX
prefix booleanstring
Default
false
Run a flow if the list of preconditions is met in a time window.
id *Requiredstring
Validation RegExp
^[a-zA-Z0-9][a-zA-Z0-9_-]*
Min length
1
type *Requiredobject
resetOnSuccess boolean
Default
true
timeWindow TimeWindow
Default
{
"type": "DURATION_WINDOW"
}
Condition to exclude other conditions.
Condition to execute tasks on a specific day of the week relative to the current month (first, last, ...)
dayInMonth *Requiredstring
Possible Values
FIRST
LAST
SECOND
THIRD
FOURTH
dayOfWeek *Requiredstring
Possible Values
MONDAY
TUESDAY
WEDNESDAY
THURSDAY
FRIDAY
SATURDAY
SUNDAY
type *Requiredobject
date string
Default
{{ trigger.date }}
Condition based on variable expression.
expression *Requiredstring
type *Requiredobject
Condition to allow events on a particular day of the week.
dayOfWeek *Requiredstring
Possible Values
MONDAY
TUESDAY
WEDNESDAY
THURSDAY
FRIDAY
SATURDAY
SUNDAY
type *Requiredobject
date string
Default
{{ trigger.date }}
Condition based on execution status.
type *Requiredobject
in array
SubType string
Possible Values
CREATED
RUNNING
PAUSED
RESTARTED
KILLING
SUCCESS
WARNING
FAILED
KILLED
CANCELLED
QUEUED
RETRYING
RETRIED
SKIPPED
BREAKPOINT
notIn array
SubType string
Possible Values
CREATED
RUNNING
PAUSED
RESTARTED
KILLING
SUCCESS
WARNING
FAILED
KILLED
CANCELLED
QUEUED
RETRYING
RETRIED
SKIPPED
BREAKPOINT
Condition to allow events between two specific datetime values.
type *Requiredobject
after string
Format
date-time
before string
Format
date-time
date string
Default
{{ trigger.date }}
Condition that matches if any taskRun has retry attempts.
type *Requiredobject
in array
SubType string
Possible Values
CREATED
RUNNING
PAUSED
RESTARTED
KILLING
SUCCESS
WARNING
FAILED
KILLED
CANCELLED
QUEUED
RETRYING
RETRIED
SKIPPED
BREAKPOINT
notIn array
SubType string
Possible Values
CREATED
RUNNING
PAUSED
RESTARTED
KILLING
SUCCESS
WARNING
FAILED
KILLED
CANCELLED
QUEUED
RETRYING
RETRIED
SKIPPED
BREAKPOINT
Condition to allow events on public holidays.
type *Requiredobject
country string
date string
Default
{{ trigger.date }}