🚀 New! Kestra raises $3 million to grow Learn more

Trigger Trigger

yaml
type: "io.kestra.plugin.azure.storage.blob.Trigger"

Wait for files on Azure Blob Storage

This trigger will poll every interval blob storage. You can search for all files in a container or directory in from or you can filter the files with a regExp.The detection is atomic, internally we do a list and interact only with files listed. Once a file is detected, we download the file on internal storage and processed with declared action in order to move or delete the files from the container (to avoid double detection on new poll)

Examples

Wait for a list of file on a Azure Blob Storage bucket and iterate through the files

yaml
id: storage-listen
namespace: io.kestra.tests

tasks:
  - id: each
    type: io.kestra.core.tasks.flows.EachSequential
    tasks:
      - id: return
        type: io.kestra.core.tasks.debugs.Return
        format: "{{taskrun.value}}"
    value: "{{ trigger.blobs | jq('.[].uri') }}"

triggers:
  - id: watch
    type: io.kestra.plugin.azure.storage.blob.Trigger
    endpoint: "https://yourblob.blob.core.windows.net"
    connectionString: "DefaultEndpointsProtocol=...=="
    container: "mydata"
    prefix: "trigger/storage-listen"
    action: MOVE
    moveTo: 
      container: mydata
      name: archive

Properties

container

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The blob container

endpoint

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The blob service endpoint.

additionally parses it for information (SAS token)

filter

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: FILES
  • Possible Values:
    • FILES
    • DIRECTORY
    • BOTH

The filter files or directory

action

  • Type: string
  • Dynamic:
  • Required:
  • Possible Values:
    • MOVE
    • DELETE

conditions

  • Type: array
  • SubType: Condition
  • Dynamic:
  • Required:

List of Conditions in order to limit the flow trigger.

connectionString

  • Type: string
  • Dynamic: ✔️
  • Required:

Connection string of the storage account.

delimiter

  • Type: string
  • Dynamic: ✔️
  • Required:

The delimiter for blob hierarchy, "/" for hierarchy based on directories.

interval

  • Type: string
  • Dynamic:
  • Required:
  • Default: 60.000000000
  • Format: duration

Interval between polling

The interval between 2 different test of schedule, this can avoid to overload the remote system with too many call. For most of trigger that depend on external system, a minimal interval must be at least PT30S. See ISO_8601 Durations for more information of available interval value

moveTo

prefix

  • Type: string
  • Dynamic: ✔️
  • Required:

Limits the response to keys that begin with the specified prefix.

regexp

  • Type: string
  • Dynamic: ✔️
  • Required:

A regexp to filter on full key

ex: regExp: .* to match all files regExp: .*2020-01-0.\\.csv to match files between 01 and 09 of january ending with .csv

sasToken

  • Type: string
  • Dynamic: ✔️
  • Required:

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.

sharedKeyAccountAccessKey

  • Type: string
  • Dynamic: ✔️
  • Required:

Shared Key access key for authenticating requests

sharedKeyAccountName

  • Type: string
  • Dynamic: ✔️
  • Required:

Shared Key account name for authenticating requests

Outputs

blobs

  • Type: array
  • SubType: Blob

The list of objects

Definitions

Blob

container

  • Type: string
  • Dynamic:
  • Required:

name

  • Type: string
  • Dynamic:
  • Required:

size

  • Type: integer
  • Dynamic:
  • Required:

uri

  • Type: string
  • Dynamic:
  • Required:

CopyObject

container

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The blob container

name

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️

The full blob path on the container