Query a SurrealDB database on a regular interval to trigger flow on results.
type: "io.kestra.plugin.surrealdb.Trigger"
Wait for SurrealQL query to return results, and then iterate through rows.
id: surrealdb_trigger
namespace: company.team
tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
values: "{{ trigger.rows }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ json(taskrun.value) }}"
triggers:
- id: watch
type: io.kestra.plugin.surrealdb.Trigger
interval: "PT5M"
host: localhost
port: 8000
username: surreal_user
password: surreal_passwd
namespace: surreal_namespace
database: surreal_db
fetchType: FETCH
query: SELECT * FROM SURREAL_TABLE
Connection database.
The way you want to store data.
FETCH_ONE - output the first row. FETCH - output all rows as output variable. STORE - store all rows to a file. NONE - do nothing.
Connection host.
Connection namespace.
SurrealQL query to execute.
Connection timeout. Default is 60
seconds.
Interval 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.
Query parameters, can be named parameters.
See SurrealDB documentation about SurrealQL Prepared Statements for query syntax.This should be supplied with a parameter map using named parameters.
Plaintext authentication password.
Connection port. Default value is 8000
.
List of execution states after which a trigger should be stopped (a.k.a. disabled).
Specify whether to use TLS for connection. Default is false
.
Plaintext authentication username.