mosche opened a new issue, #23691:
URL: https://github.com/apache/beam/issues/23691

   ### What would you like to happen?
   
   Unfortunately InfluxQL is very limited. Many, rather basic types of queries 
can only be done using the [Flux query 
interface](https://docs.influxdata.com/influxdb/v1.8/flux/). E.g. extracting 
parts from a string for readability or also grouping by a dynamic set of 
columns as required to handle Java microbenchmark (JMH) params.
   
   > Grafana supports Flux running on InfluxDB 1.8+. See [1.8 
compatibility](https://github.com/influxdata/influxdb-client-go/#influxdb-18-api-compatibility)
 for more information and connection details.
   https://grafana.com/docs/grafana/v8.1/datasources/influxdb/influxdb-flux/
   
   For 1.8 it has to be enabled using `INFLUXDB_HTTP_FLUX_ENABLED=true`
   Though, it looks like the versions are incompatible. I wasn't able to 
successfully test it without upgrading InfluxDB to 2.x. But it might have been 
misconfiguration:
   ```
   panic: column retentionPeriod:int is not of type string
   ```
   
   
   Here's an example:
   
   ```
   import "regexp"
   
   from(bucket: "beam_test_metrics/a_year")
     |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
     |> truncateTimeColumn(unit: 1w)
     |> filter(fn: (r) => r["_measurement"] == "java_jmh_thrpt" and 
r["benchmark"] =~ /ByteStringOutputStreamBenchmark/ and r["_field"] == "score")
     |> map(fn: (r) => ({r with name: regexp.findString(v: r.benchmark, 
r:/\w+\.\w+$/)}))
     |> drop(columns: ["benchmark", "scoreUnit", "_field", "_measurement"])
     |> group(columns: ["_time", "_value"], mode: "except")
     |> aggregateWindow(every: 1w, fn: mean, createEmpty: true)
     |> fill(value:0.0)
   ```
   ![Screenshot 2022-10-18 at 09 40 
30](https://user-images.githubusercontent.com/1401430/196367278-97564e5f-9271-4006-9526-ae8d8a41f782.png)
   
   
   
   
   ### Issue Priority
   
   Priority: 2
   
   ### Issue Component
   
   Component: community-metrics


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to