influxdata / influxdata/influxdb-client-js
Add example for multiple flux queries
- Dominant language
- TypeScript
- Stars
- 352
- Forks
- 69
- Avg merge
- 10m
- Merged PRs (30d)
- 11
Description
__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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the existing client examples and the Flux documentation and experimental.chain() links in the issue. Verify how multiple queries are formatted, how yield() is used, and how their output is handled; done means an example and documentation clearly cover these points.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100