Alibaba Cloud Trigger

Alibaba Cloud Trigger

Certified

Trigger on MaxCompute query results

Periodically executes a MaxCompute SQL query and triggers a flow execution when rows are returned. Supports persisting watermarks in the namespace KV store to prevent duplicate processing.

yaml
type: io.kestra.plugin.alibaba.maxcompute.Trigger

Poll for new records in MaxCompute

yaml
id: maxcompute_listen
namespace: company.team

tasks:
  - id: log_rows
    type: io.kestra.plugin.core.log.Log
    message: "Found {{ trigger.size }} new rows"

triggers:
  - id: watch_orders
    type: io.kestra.plugin.alibaba.maxcompute.Trigger
    accessKeyId: "{{ secret('ALIBABA_ACCESS_KEY_ID') }}"
    accessKeySecret: "{{ secret('ALIBABA_ACCESS_KEY_SECRET') }}"
    region: cn-shanghai
    project: analytics
    sql: "SELECT * FROM orders WHERE id > '{{ trigger.watermark }}' ORDER BY id ASC LIMIT 50"
    watermarkField: id
    initialWatermark: "0"
    interval: PT5M
    fetchType: FETCH
Properties

The AccessKey ID

The AccessKey Secret

Project

MaxCompute project name.

SQL query

Query executed on each poll. May reference {{ trigger.watermark }}, escaped for a single-quoted SQL literal. Use an appropriate initialWatermark and filter strictly greater than the watermark.

Watermark column

Required monotonically increasing column. Numeric values compare numerically; ISO instants compare chronologically; other strings compare lexicographically. Order ascending and avoid splitting equal watermark values across batches.

Defaultfalse

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

Endpoint override

DefaultFETCH
Possible Values
STOREFETCHFETCH_ONENONE

Result handling mode

FETCH or STORE; defaults to FETCH.

Default

Initial watermark

Value exposed before the first poll; defaults to empty string. For numeric IDs, set a lower bound such as 0.

DefaultPT1M
Formatduration

Polling interval

Interval between query runs; defaults to 60 seconds.

Region

Region used to derive the endpoint when endpointOverride is absent.

Security Token

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

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

Tunnel endpoint override

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.

The MaxCompute instance ID

Map containing the first row

Only populated if fetchType is FETCH_ONE

SubTypeobject

List containing fetched rows

Only populated if fetchType is FETCH

The total number of rows returned

Formaturi

The URI of the stored result in internal storage

Only populated if fetchType is STORE