Learning Flux instead of influxQL for external Query? Clients?

2020-12-04-16-50 Chronograf Data.csv.gz (16.6 KB)

Hello @Anaisdg,

had a big improvement. Think influxDB UI is only available for v2.0 right? So installed Chronograf and this is very big help for developing Queries in influxQL but in addition also in FLUX. Please find attached a data export from my “shortterm” database for 3h.
The values are in W(att).
My final goal is to be able to have a longterm database grouped by(15m) which gives values in kWh.
Question is if i have to use (v1.8.3) Continuous Queries or am I also able to use Tasks?

Continuos Queries do calculate the integral right but I have the problem with the timestamp (as given example before/above).

Therefore I startet to develop in Flux and beginning with simple Queries like:

influx -type=flux -path-prefix /api/v2/query -username user -password xyz -execute ‘from(bucket:“longterm”)
|> range(start: -1h)
|> filter(fn: (r) => r._measurement == “javascript.0.scriptEnabled.PV.WRPACges”)
|> integral()’

Within this development process I recognized that integral() is working but sum() producing an error. Now I changed bucket from longterm to shortterm database and integral is also producing error. So guess this is based on wrong usage of aggegation by me. Haven´t had a closer look how timestamp can be handled and if this is working better than in influxQL for me.

Nevertheless I´m looking for a solution to downsample data (continuous query or task) by integral for filling a longterm database. Within that filling of longterm database the timestamp should be based on the Last Timestamp used in the intergral time period.

mmmh long story…sorry