Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example for multiple flux queries #678

Open
findbl0k opened this issue Dec 31, 2022 · 1 comment
Open

Add example for multiple flux queries #678

findbl0k opened this issue Dec 31, 2022 · 1 comment

Comments

@findbl0k
Copy link

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.

@powersj
Copy link
Contributor

powersj commented Jan 25, 2023

Hi,

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

Are you willing to share an example, based on your scenario? I'd like to see what you came up with as I am also uncertain if this should be done in this client library repo's docs or in the flux docs themselves.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants