You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Steps to reproduce:
List the minimal actions needed to reproduce the behaviour.
Submit the following flux query:
from(bucket: "energy")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "electricity")
|> filter(fn: (r) => r["_field"] == "usage")
|> aggregateWindow(every: 1h, fn: last, createEmpty: false, timeSrc: "_start")
|> difference()
|> map(fn: (r) => ({r with
_value: if (r._time > 2024-04-12T03:00:00Z and r._time <= 2024-04-12T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-12T12:00:00Z and r._time <= 2024-04-12T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-13T03:00:00Z and r._time <= 2024-04-13T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-13T12:00:00Z and r._time <= 2024-04-13T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-14T03:00:00Z and r._time <= 2024-04-14T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-14T12:00:00Z and r._time <= 2024-04-14T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-15T03:00:00Z and r._time <= 2024-04-15T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-15T12:00:00Z and r._time <= 2024-04-15T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-16T03:00:00Z and r._time <= 2024-04-16T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-16T12:00:00Z and r._time <= 2024-04-16T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-17T03:00:00Z and r._time <= 2024-04-17T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-17T12:00:00Z and r._time <= 2024-04-17T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-18T03:00:00Z and r._time <= 2024-04-18T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-18T12:00:00Z and r._time <= 2024-04-18T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-19T03:00:00Z and r._time <= 2024-04-19T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-19T12:00:00Z and r._time <= 2024-04-19T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-20T03:00:00Z and r._time <= 2024-04-20T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-20T12:00:00Z and r._time <= 2024-04-20T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-21T03:00:00Z and r._time <= 2024-04-21T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-21T12:00:00Z and r._time <= 2024-04-21T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-22T03:00:00Z and r._time <= 2024-04-22T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-22T12:00:00Z and r._time <= 2024-04-22T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-23T03:00:00Z and r._time <= 2024-04-23T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-23T12:00:00Z and r._time <= 2024-04-23T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-24T03:00:00Z and r._time <= 2024-04-24T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-24T12:00:00Z and r._time <= 2024-04-24T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-25T03:00:00Z and r._time <= 2024-04-25T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-25T12:00:00Z and r._time <= 2024-04-25T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-26T03:00:00Z and r._time <= 2024-04-26T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-26T12:00:00Z and r._time <= 2024-04-26T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-27T03:00:00Z and r._time <= 2024-04-27T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-27T12:00:00Z and r._time <= 2024-04-27T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-28T03:00:00Z and r._time <= 2024-04-28T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-28T12:00:00Z and r._time <= 2024-04-28T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-29T03:00:00Z and r._time <= 2024-04-29T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-29T12:00:00Z and r._time <= 2024-04-29T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-30T03:00:00Z and r._time <= 2024-04-30T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-04-30T12:00:00Z and r._time <= 2024-04-30T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-01T03:00:00Z and r._time <= 2024-05-01T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-01T12:00:00Z and r._time <= 2024-05-01T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-02T03:00:00Z and r._time <= 2024-05-02T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-02T12:00:00Z and r._time <= 2024-05-02T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-03T03:00:00Z and r._time <= 2024-05-03T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-03T12:00:00Z and r._time <= 2024-05-03T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-04T03:00:00Z and r._time <= 2024-05-04T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-04T12:00:00Z and r._time <= 2024-05-04T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-05T03:00:00Z and r._time <= 2024-05-05T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-05T12:00:00Z and r._time <= 2024-05-05T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-06T03:00:00Z and r._time <= 2024-05-06T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-06T12:00:00Z and r._time <= 2024-05-06T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-07T03:00:00Z and r._time <= 2024-05-07T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-07T12:00:00Z and r._time <= 2024-05-07T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-08T03:00:00Z and r._time <= 2024-05-08T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-08T12:00:00Z and r._time <= 2024-05-08T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-09T03:00:00Z and r._time <= 2024-05-09T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-09T12:00:00Z and r._time <= 2024-05-09T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-10T03:00:00Z and r._time <= 2024-05-10T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-10T12:00:00Z and r._time <= 2024-05-10T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-11T03:00:00Z and r._time <= 2024-05-11T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-11T12:00:00Z and r._time <= 2024-05-11T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-12T03:00:00Z and r._time <= 2024-05-12T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-12T12:00:00Z and r._time <= 2024-05-12T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-13T03:00:00Z and r._time <= 2024-05-13T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-13T12:00:00Z and r._time <= 2024-05-13T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-14T03:00:00Z and r._time <= 2024-05-14T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-14T12:00:00Z and r._time <= 2024-05-14T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-15T03:00:00Z and r._time <= 2024-05-15T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-15T12:00:00Z and r._time <= 2024-05-15T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-16T03:00:00Z and r._time <= 2024-05-16T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-16T12:00:00Z and r._time <= 2024-05-16T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-17T03:00:00Z and r._time <= 2024-05-17T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-17T12:00:00Z and r._time <= 2024-05-17T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-18T03:00:00Z and r._time <= 2024-05-18T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-18T12:00:00Z and r._time <= 2024-05-18T14:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-19T03:00:00Z and r._time <= 2024-05-19T09:00:00Z) then
r._value *0.84
else if (r._time > 2024-05-19T12:00:00Z and r._time <= 2024-05-19T14:00:00Z) then
r._value *0.84
else
r._value * 0.3
}))
|> aggregateWindow(every: 1mo, fn: sum, createEmpty: false, timeSrc: "_start")
Expected behaviour:
The query should execute successfully.
Steps to reproduce:
List the minimal actions needed to reproduce the behaviour.
Expected behaviour:
The query should execute successfully.
Actual behaviour:
Program crashes.
Environment info:
Config:
Use default config.
Logs:
The text was updated successfully, but these errors were encountered: