Skip to content

Add example for multiple flux queries #678

Open
@findbl0k

Description

@findbl0k

Proposal:
Multiple flux queries are supported in a single API call, but it is not clear in the documentation or example how this should be done or how the output should be handled. Examples with multiple queries should be added to this library. And a reference to multiple queries should be added to the docs at: docs.influxdata.com/flux

Current behavior:
No documentation. Googling, the only reference I found for multiple queries led me to the experimental.chain() in the docs. There it says "Flux typically executes multiple queries in a single script in parallel." So it seemed possible. But there is no reference on how to format the queries (which is string addition, no commas). After a lot of research, I found a thread on the influx forums that references the yield() function which is required when executing multiple queries.

experimental chain docs: https://docs.influxdata.com/flux/v0.x/stdlib/experimental/chain/
forum thread where I discovered the yield() function: https://community.influxdata.com/t/flux-multiple-query-join/21294/3

Desired behavior:
Example with multiple queries. Proper documentation with reference to yield() function.

Alternatives considered:
Giving up.

Use case:
Why is this important (helps with prioritizing requests)? Documentation here is very sparse, and could have saved me a lot of time researching and tinkering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions