Wait for query on a MongoDB collection.
type: "io.kestra.plugin.mongodb.Trigger"
Wait for a MongoDB query to return results, and then iterate through rows.
id: mongodb_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.mongodb.Trigger
interval: "PT5M"
connection:
uri: mongodb://root:example@localhost:27017/?authSource=admin
database: samples
collection: books
filter:
pageCount:
$gte: 50
sort:
pageCount: -1
projection:
title: 1
publishedDate: 1
pageCount: 1
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.
List of execution states after which a trigger should be stopped (a.k.a. disabled).
List containing the fetched data.
Only populated if store
parameter is set to false.
The number of rows fetched.
URI of the file containing the fetched results.
Only populated if store
parameter is set to true.
Connection string to MongoDB server.
URL format like mongodb://mongodb0.example.com:27017