
Azure Trigger
CertifiedTrigger a flow on new file arrival in Azure Data Lake Storage
Azure Trigger
Trigger a flow on new file arrival in Azure Data Lake Storage
This trigger will poll the specified Azure Data Lake Storage file system every interval. Using the from and regExp properties, you can define which files' arrival will trigger the flow. Under the hood, we use the Azure Data Lake Storage API to list the files in a specified location and download them to the internal storage and process them with the declared action. You can use the action property to move or delete the files from the container after processing to avoid the trigger to be fired again for the same files during the next polling interval.
type: io.kestra.plugin.azure.storage.adls.TriggerExamples
Run a flow if one or more files arrived in the specified Azure Data Lake Storage file system location. Then, process all files in a for-loop either sequentially or concurrently, depending on the concurrencyLimit property.
id: react_to_files
namespace: company.team
tasks:
- id: each
type: io.kestra.plugin.core.flow.Loop
concurrencyLimit: 1
values: "{{ trigger.files | jq('.[].uri') }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ item.value }}"
triggers:
- id: watch
type: io.kestra.plugin.azure.storage.adls.Trigger
interval: PT5M
endpoint: "https://yourblob.blob.core.windows.net"
connectionString: "{{ secret('AZURE_CONNECTION_STRING') }}"
fileSystem: myFileSystem
directoryPath: yourDirectory/subdirectory
Properties
action string
NONEMOVEDELETENONEThe action to perform on the retrieved files. If using NONE, make sure to handle the files inside your flow to avoid infinite triggering
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
connectionString string
Connection string of the Storage Account.
directoryPath string
The directory path to monitor
endpoint string
The blob service endpoint.
fileSystem string
The ADLS file system (container) to monitor
interval Non-dynamicstring
PT1MdurationInterval 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.
maxFiles integerstring
25The maximum number of files to retrieve at once
Limits the number of files retrieved per polling interval. If not specified, all matching files will be retrieved.
moveTo
The destination container and key
io.kestra.plugin.azure.storage.adls.Trigger-DestinationObject
The full destination directory path on the file system
The destination file system
on string
CREATE_OR_UPDATECREATEUPDATECREATE_OR_UPDATETrigger event type
Defines when the trigger fires.
CREATE: only for newly discovered entities.UPDATE: only when an already-seen entity changes.CREATE_OR_UPDATE: fires on either event.
sasToken string
The SAS token to use for authenticating requests.
This string should only be the query parameters (with or without a leading '?') and not a full URL.
stateKey string
State key
JSON-type KV key for persisted state.
Default: <namespace>__<flowId>__<triggerId>
stateTtl string
State TTL
TTL for persisted state entries (e.g., PT24H, P7D).
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
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
files array
List of files that triggered the flow, each with its change type
io.kestra.plugin.azure.storage.adls.Trigger-TriggeredFile
CREATEUPDATEcom.azure.storage.file.datalake.models.ArchiveStatus
com.azure.storage.file.datalake.models.AccessTier
date-timedate-timeINFINITEFIXEDAVAILABLELEASEDEXPIREDBREAKINGBROKENLOCKEDUNLOCKEDuri