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

Parametrized flux queries against influxdb cloud #82

Open
syed-imam opened this issue Jul 18, 2023 · 0 comments
Open

Parametrized flux queries against influxdb cloud #82

syed-imam opened this issue Jul 18, 2023 · 0 comments

Comments

@syed-imam
Copy link

Missing support for parametrized flux queries which influxdb api supports

We should ideally be able to write a parametrized flux query like below:

  query = """
  from(bucket: params.bucket)
  |> range(start: #{range.from}T04:00:00.000Z, stop: #{range.to}T03:59:00.000Z)
  |> filter(fn: (r) => r._measurement == params.series)
  |> pivot(rowKey:["_time"], columnKey: ["_field"], valueColumn: "_value")
  |> group()
  |> map(fn: (r) => ({ r with _value: 1 }))
  |> count()
  """

InfluxConnection.query(query, params: %{bucket: "test", series: "series"})
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

1 participant