|
30 | 30 | @Example( |
31 | 31 | title = "Wait for a N1QL query to return results, and then iterate through rows.", |
32 | 32 | full = true, |
33 | | - code = { |
34 | | - "id: couchbase-trigger", |
35 | | - "namespace: company.team", |
36 | | - "", |
37 | | - "tasks:", |
38 | | - " - id: each", |
39 | | - " type: io.kestra.plugin.core.flow.EachSequential", |
40 | | - " tasks:", |
41 | | - " - id: return", |
42 | | - " type: io.kestra.plugin.core.debug.Return", |
43 | | - " format: \"{{ json(taskrun.value) }}\"", |
44 | | - " value: \"{{ trigger.rows }}\"", |
45 | | - "", |
46 | | - "triggers:", |
47 | | - " - id: watch", |
48 | | - " type: io.kestra.plugin.couchbase.Trigger", |
49 | | - " interval: \"PT5M\"", |
50 | | - " connectionString: couchbase://localhost", |
51 | | - " username: couchbase_user", |
52 | | - " password: couchbase_passwd", |
53 | | - " query: SELECT * FROM `COUCHBASE_BUCKET`(.`COUCHBASE_SCOPE`.`COUCHBASE_COLLECTION`)", |
54 | | - " fetchType: FETCH" |
55 | | - } |
| 33 | + code = """ |
| 34 | + id: couchbase_trigger |
| 35 | + namespace: company.team |
| 36 | + |
| 37 | + tasks: |
| 38 | + - id: each |
| 39 | + type: io.kestra.plugin.core.flow.ForEach |
| 40 | + values: "{{ trigger.rows }}" |
| 41 | + tasks: |
| 42 | + - id: return |
| 43 | + type: io.kestra.plugin.core.debug.Return |
| 44 | + format: "{{ json(taskrun.value) }}" |
| 45 | + |
| 46 | + triggers: |
| 47 | + - id: watch |
| 48 | + type: io.kestra.plugin.couchbase.Trigger |
| 49 | + interval: "PT5M" |
| 50 | + connectionString: couchbase://localhost |
| 51 | + username: couchbase_user |
| 52 | + password: couchbase_passwd |
| 53 | + query: SELECT * FROM `COUCHBASE_BUCKET`(.`COUCHBASE_SCOPE`.`COUCHBASE_COLLECTION`) |
| 54 | + fetchType: FETCH |
| 55 | + """ |
56 | 56 | ) |
57 | 57 | } |
58 | 58 | ) |
|
0 commit comments