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

Trigger Trigger

yaml
type: "io.kestra.plugin.couchbase.Trigger"

Query a Couchbase database on interval to trigger flow on results.

Examples

Wait for a N1QL query to return results and iterate through rows

yaml
id: couchbase-trigger
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: "{{json(taskrun.value)}}"
    value: "{{ trigger.rows }}"

triggers:
  - id: watch
    type: io.kestra.plugin.couchbase.Trigger
    interval: "PT5M"
    connectionString: couchbase://localhost
    username: couchbase_user
    password: couchbase_passwd
    query: SELECT * FROM COUCHBASE_BUCKET(.COUCHBASE_SCOPE.COUCHBASE_COLLECTION)
    fetchType: FETCH

Properties

connectionString

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Min length: 1

Connection string used to locate the Couchbase cluster.

fetchType

  • Type: string
  • Dynamic:
  • Required: ✔️
  • Default: STORE
  • Possible Values:
    • STORE
    • FETCH
    • FETCH_ONE
    • NONE

The way you want to store the data

FETCH_ONE output the first row FETCH output all the row STORE store all row in a file NONE do nothing

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

password

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Min length: 1

Plaintext authentication password

query

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Min length: 1

N1QL query to execute.

username

  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Min length: 1

Plaintext authentication username

conditions

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

List of Conditions in order to limit the flow trigger.

parameters

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

Query parameters, can be positional or named parameters.

See Couchbase documentation about Prepared Statements for query syntax.This should be supplied with a parameter map if using named parameters or an array for positional ones

Outputs

row

  • Type: object

Map containing the first row of fetched data

Only populated if using FETCH_ONE.

rows

  • Type: array
  • SubType: object

List containing the fetched data

Only populated if using FETCH.

size

  • Type: integer

The amount of rows fetched

uri

  • Type: string

The uri of the stored result

Only populated if using STORE

Definitions