FluxQuery ​Flux​Query

yaml
type: "io.kestra.plugin.influxdb.fluxquery"
yaml
id: influxdb_flux_query
namespace: company.team

tasks:
  - id: query_influxdb
    type: io.kestra.plugin.influxdb.FluxQuery
    connection:
      url: "{{ secret('INFLUXDB_URL') }}"
      token: "{{ secret('INFLUXDB_TOKEN') }}"
    org: "my-org"
    query: |
      from(bucket: "my-bucket")
        |> range(start: -1h)
        |> filter(fn: (r) => r._measurement == "cpu")
        |> yield()
    fetchType: STORE

yaml
id: influxdb_flux_query_inline
namespace: company.team

tasks:
  - id: query_influxdb
    type: io.kestra.plugin.influxdb.FluxQuery
    connection:
      url: "{{ secret('INFLUXDB_URL') }}"
      token: "{{ secret('INFLUXDB_TOKEN') }}"
    org: "my-org"
    query: |
      from(bucket: "my-bucket")
        |> range(start: -1h)
        |> filter(fn: (r) => r._measurement == "cpu")
        |> limit(n: 10)
        |> yield()
    fetchType: FETCH

yaml
id: influxdb_flux_query_one
namespace: company.team

tasks:
  - id: query_influxdb
    type: io.kestra.plugin.influxdb.FluxQuery
    connection:
      url: "{{ secret('INFLUXDB_URL') }}"
      token: "{{ secret('INFLUXDB_TOKEN') }}"
    org: "my-org"
    query: |
      from(bucket: "my-bucket")
        |> range(start: -1h)
        |> filter(fn: (r) => r._measurement == "cpu")
        |> limit(n: 1)
        |> yield()
    fetchType: FETCH_ONE
Properties
Default NONE
Possible Values
STOREFETCHFETCH_ONENONE
SubType object
Format uri